Verified Commit 37c7dee0 authored by Kevin Morris's avatar Kevin Morris
Browse files

fix: produce DeleteNotification a line before handle_request



With this on a single line, the argument ordering and class/func
execution was a bit too RNG causing exceptions to be thrown when
producing a notification based off of a deleted pkgbase object.

Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
parent 62495404
Pipeline #28939 passed with stages
in 2 minutes and 47 seconds
......@@ -99,9 +99,8 @@ def pkgbase_adopt_instance(request: Request, pkgbase: PackageBase) -> None:
def pkgbase_delete_instance(
request: Request, pkgbase: PackageBase, comments: str = str()
) -> list[notify.Notification]:
notifs = handle_request(request, DELETION_ID, pkgbase) + [
notify.DeleteNotification(request.user.ID, pkgbase.ID)
]
notif = notify.DeleteNotification(request.user.ID, pkgbase.ID)
notifs = handle_request(request, DELETION_ID, pkgbase) + [notif]
with db.begin():
update_closure_comment(pkgbase, DELETION_ID, comments)
......
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