Fix approved checkbox deselection bug

This commit is contained in:
rubenwardy 2020-01-19 20:01:06 +00:00
parent e115b0678c
commit 2ef90902aa

@ -166,6 +166,11 @@ 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":
form.approved.data = release.approved
if request.method == "POST" and form.validate(): if request.method == "POST" and form.validate():
wasApproved = release.approved wasApproved = release.approved
if canEdit: if canEdit: