Verified Commit b8a4ce4c authored by Kevin Morris's avatar Kevin Morris
Browse files

fix: include maint/comaint state in pkgbase post's error context

Closes #386



Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 8a3a7e31
Pipeline #27298 passed with stages
in 2 minutes and 4 seconds
......@@ -587,6 +587,9 @@ async def pkgbase_disown_post(
context = templates.make_context(request, "Disown Package")
context["pkgbase"] = pkgbase
context["is_maint"] = request.user == pkgbase.Maintainer
context["is_comaint"] = request.user in comaints
if not confirm:
context["errors"] = [
(
......@@ -610,9 +613,7 @@ async def pkgbase_disown_post(
request, "pkgbase/disown.html", context, status_code=HTTPStatus.BAD_REQUEST
)
if not next:
next = f"/pkgbase/{name}"
next = next or f"/pkgbase/{name}"
return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment