Fix approved checkbox deselection bug

This commit is contained in:
rubenwardy 2020-01-19 20:01:06 +00:00
parent e115b0678c
commit 2ef90902aa
1 changed files with 5 additions and 0 deletions

View File

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