Redirect to reports after attempting to recreate package

This commit is contained in:
rubenwardy 2024-08-26 00:17:19 +01:00
parent bb561104f8
commit 2b62224a5b

@ -266,6 +266,7 @@ def handle_create_edit(package: typing.Optional[Package], form: PackageForm, aut
flash( flash(
gettext("Package already exists, but is removed. Please contact ContentDB staff to restore the package"), gettext("Package already exists, but is removed. Please contact ContentDB staff to restore the package"),
"danger") "danger")
return redirect(url_for("report.report", url=package.get_url("packages.view")))
else: else:
flash(markupsafe.Markup( flash(markupsafe.Markup(
f"<a class='btn btn-sm btn-danger float-end' href='{package.get_url('packages.view')}'>View</a>" + f"<a class='btn btn-sm btn-danger float-end' href='{package.get_url('packages.view')}'>View</a>" +