master
Aevann 2024-04-09 17:41:22 +02:00
parent 5066d43870
commit 6bc6b8953d
1 changed files with 4 additions and 3 deletions

View File

@ -44,13 +44,14 @@ def submit_art_post(v):
if not file or not file.content_type.startswith('image/'):
abort(400, "You need to submit an image!")
username = request.values.get('author', '').lower().strip()
author = get_user(username, v=v)
kind = request.values.get('kind', '').strip()
if kind not in {"sidebar", "banner"}:
abort(400, "Invalid kind!")
username = request.values.get('author', '').lower().strip()
author = get_user(username, v=v)
entry = ArtSubmission(
kind=kind,
author_id=author.id,