fix(routers.pkgbase): fix next argument for merge redirection

This was redirecting us to the package which we merged, leading
us into a 404. This fixes that issue by instead redirecting us
into the target we merge into.

Closes #231

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-01-03 22:18:06 -08:00
parent 83dc26ccde
commit 71e73ca654
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -785,9 +785,6 @@ async def pkgbase_merge_get(request: Request, name: str,
next: str = Query(default=str())): next: str = Query(default=str())):
pkgbase = get_pkg_or_base(name, PackageBase) pkgbase = get_pkg_or_base(name, PackageBase)
if not next:
next = f"/pkgbase/{pkgbase.Name}"
context = templates.make_context(request, "Package Merging") context = templates.make_context(request, "Package Merging")
context.update({ context.update({
"pkgbase": pkgbase, "pkgbase": pkgbase,