diff --git a/app/blueprints/packages/releases.py b/app/blueprints/packages/releases.py index 35b27c18..669f4b12 100644 --- a/app/blueprints/packages/releases.py +++ b/app/blueprints/packages/releases.py @@ -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: