check hole name and give error
parent
6ec74490ff
commit
47ac2cfd41
|
@ -53,6 +53,10 @@ def submit_art_post(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!")
|
||||
|
||||
entry = ArtSubmission(
|
||||
kind=kind,
|
||||
|
|
Loading…
Reference in New Issue