aboutsummaryrefslogtreecommitdiff
path: root/app/views/packages/editrequests.py
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-29 20:51:42 +0100
committerrubenwardy <rw@rubenwardy.com>2018-05-29 20:51:42 +0100
commitfa2f17526f0999c5081cae577903efef9111a4be (patch)
treefc6bfc0a75fa3ca1acac38d4fd8b742122c61d5b /app/views/packages/editrequests.py
parent002e6828b66587a58dbae15aef33b14d3d6d0fc5 (diff)
downloadcheatdb-fa2f17526f0999c5081cae577903efef9111a4be.tar.xz
Disable edit requests
Diffstat (limited to 'app/views/packages/editrequests.py')
-rw-r--r--app/views/packages/editrequests.py7
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()