mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Fix crash in edit release caused by is_package_page addition
This commit is contained in:
parent
889e130e6b
commit
4d94e4a326
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user