Fix 404 on new package
This commit is contained in:
parent
8d2bb12ad4
commit
fa35025ec1
@ -168,7 +168,7 @@ def create_edit_package_page(author=None, name=None):
|
|||||||
if request.method == "POST" and form.validate():
|
if request.method == "POST" and form.validate():
|
||||||
wasNew = False
|
wasNew = False
|
||||||
if not package:
|
if not package:
|
||||||
package = getPackageByInfo(author.username, form["name"].data)
|
package = Package.query.filter_by(name=form["name"].data, author_id=author.id).first()
|
||||||
if package is not None:
|
if package is not None:
|
||||||
flash("Package already exists!", "error")
|
flash("Package already exists!", "error")
|
||||||
return redirect(url_for("create_edit_package_page"))
|
return redirect(url_for("create_edit_package_page"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user