Add support for importing generic git releases

This commit is contained in:
rubenwardy
2018-06-05 23:13:39 +01:00
parent 3d97eca387
commit 8601c5e075
4 changed files with 58 additions and 44 deletions

View File

@@ -52,8 +52,8 @@ def create_release_page(package):
# Initial form class from post data and default data
form = CreatePackageReleaseForm()
if package.canMakeReleaseFromVCS():
form["uploadOpt"].choices = [("vcs", "From VCS Commit or Branch"), ("upload", "File Upload")]
if package.repo is not None:
form["uploadOpt"].choices = [("vcs", "From Git Commit or Branch"), ("upload", "File Upload")]
if request.method != "POST":
form["uploadOpt"].data = "vcs"