Fix crash in edit release caused by is_package_page addition

This commit is contained in:
rubenwardy 2018-05-13 18:55:08 +01:00
parent 889e130e6b
commit 4d94e4a326
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C

@ -423,16 +423,8 @@ def create_release_page(package):
@login_required @login_required
@is_package_page @is_package_page
def edit_release_page(package, id): def edit_release_page(package, id):
user = User.query.filter_by(username=author).first()
if user is None:
abort(404)
release = PackageRelease.query.get(id) release = PackageRelease.query.get(id)
if release is None: if release is None or release.package != package:
abort(404)
package = release.package
if package.name != name or package.author.username != author:
abort(404) abort(404)
clearNotifications(release.getEditURL()) clearNotifications(release.getEditURL())