fix 500 error

master
Aevann 2024-08-06 20:59:47 +03:00
parent 7946ea4ab2
commit 45f220c5d7
1 changed files with 2 additions and 0 deletions

View File

@ -986,6 +986,8 @@ def change_hole(pid, v):
hole_to = request.values.get("hole_to", "").strip()
if hole_to:
hole_to = get_hole(hole_to).name
else:
hole_to = None
if not post.hole_changable(v):
abort(403, "You can't change the hole of this post!")