Show message on draft packages rather than 404

This commit is contained in:
rubenwardy
2023-01-02 16:17:28 +00:00
parent a7e6f19ae6
commit 16abb636c5
2 changed files with 5 additions and 3 deletions

View File

@@ -117,9 +117,6 @@ def getReleases(package):
@is_package_page
def view(package):
if package.state != PackageState.APPROVED and not package.checkPerm(current_user, Permission.EDIT_PACKAGE):
if package.state == PackageState.WIP:
abort(404)
return render_template("packages/gone.html", package=package), 503
show_similar = not package.approved and (