diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-05-29 20:51:42 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-05-29 20:51:42 +0100 |
commit | fa2f17526f0999c5081cae577903efef9111a4be (patch) | |
tree | fc6bfc0a75fa3ca1acac38d4fd8b742122c61d5b /app/views/packages/editrequests.py | |
parent | 002e6828b66587a58dbae15aef33b14d3d6d0fc5 (diff) | |
download | cheatdb-fa2f17526f0999c5081cae577903efef9111a4be.tar.xz |
Disable edit requests
Diffstat (limited to 'app/views/packages/editrequests.py')
-rw-r--r-- | app/views/packages/editrequests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/packages/editrequests.py b/app/views/packages/editrequests.py index 51d5989..e071745 100644 --- a/app/views/packages/editrequests.py +++ b/app/views/packages/editrequests.py @@ -58,8 +58,13 @@ def create_edit_editrequest_page(package, id=None): edited_package = Package(package) erequest.applyAll(edited_package) - form = EditRequestForm(request.form, obj=edited_package) + if request.method == "GET": + deps = edited_package.dependencies + form.harddep_str.data = ",".join([str(x) for x in deps if not x.optional]) + form.softdep_str.data = ",".join([str(x) for x in deps if x.optional]) + form.provides_str.data = MetaPackage.ListToSpec(edited_package.provides) + if request.method == "POST" and form.validate(): if erequest is None: erequest = EditRequest() |