forked from rDrama/rDrama
reorder
parent
5066d43870
commit
6bc6b8953d
|
@ -44,13 +44,14 @@ def submit_art_post(v):
|
||||||
if not file or not file.content_type.startswith('image/'):
|
if not file or not file.content_type.startswith('image/'):
|
||||||
abort(400, "You need to submit an 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()
|
kind = request.values.get('kind', '').strip()
|
||||||
if kind not in {"sidebar", "banner"}:
|
if kind not in {"sidebar", "banner"}:
|
||||||
abort(400, "Invalid kind!")
|
abort(400, "Invalid kind!")
|
||||||
|
|
||||||
|
username = request.values.get('author', '').lower().strip()
|
||||||
|
author = get_user(username, v=v)
|
||||||
|
|
||||||
|
|
||||||
entry = ArtSubmission(
|
entry = ArtSubmission(
|
||||||
kind=kind,
|
kind=kind,
|
||||||
author_id=author.id,
|
author_id=author.id,
|
||||||
|
|
Loading…
Reference in New Issue