combine if

master
Aevann 2024-04-28 16:37:12 +03:00
parent 47ac2cfd41
commit b1cb1d175b
1 changed files with 2 additions and 1 deletions

View File

@ -52,11 +52,12 @@ def submit_art_post(v):
author = get_user(username, v=v)
hole = request.values.get('hole', '').lower().strip()
if not hole: hole = None
if hole:
hole = g.db.get(Hole, hole)
if not hole:
abort(404, "Hole not found!")
else:
hole = None
entry = ArtSubmission(
kind=kind,