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