Fix 404 on new package

rubenwardy 2018-05-24 01:19:26 +01:00
parent 8d2bb12ad4
commit fa35025ec1
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ def create_edit_package_page(author=None, name=None):
if request.method == "POST" and form.validate():
wasNew = False
if not package:
package = getPackageByInfo(author.username, form["name"].data)
package = Package.query.filter_by(name=form["name"].data,
if package is not None:
flash("Package already exists!", "error")
return redirect(url_for("create_edit_package_page"))