mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
parent
0bf61dda08
commit
1d8abd8f4b
@ -167,8 +167,8 @@ def edit_release(package, id):
|
||||
# Initial form class from post data and default data
|
||||
form = EditPackageReleaseForm(formdata=request.form, obj=release)
|
||||
|
||||
# HACK: fix bug in wtforms
|
||||
if request.method == "GET":
|
||||
# HACK: fix bug in wtforms
|
||||
form.approved.data = release.approved
|
||||
|
||||
if request.method == "POST" and form.validate():
|
||||
|
@ -85,6 +85,11 @@ def edit_screenshot(package, id):
|
||||
|
||||
# Initial form class from post data and default data
|
||||
form = EditScreenshotForm(formdata=request.form, obj=screenshot)
|
||||
|
||||
if request.method == "GET":
|
||||
# HACK: fix bug in wtforms
|
||||
form.approved.data = screenshot.approved
|
||||
|
||||
if request.method == "POST" and form.validate():
|
||||
if canEdit and form["delete"].data:
|
||||
PackageScreenshot.query.filter_by(id=id).delete()
|
||||
|
Loading…
Reference in New Issue
Block a user