From 468aa9cb1dd2cf43f7c98ec183719c810b940694 Mon Sep 17 00:00:00 2001 From: transcental Date: Wed, 2 Jul 2025 10:53:20 +0100 Subject: [PATCH] give assigned user resolve credit --- nephthys/actions/resolve.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nephthys/actions/resolve.py b/nephthys/actions/resolve.py index 3c441a8..7f8ae12 100644 --- a/nephthys/actions/resolve.py +++ b/nephthys/actions/resolve.py @@ -31,6 +31,13 @@ async def resolve(ts: str, resolver: str, client: AsyncWebClient): if not ticket: return + if not resolving_user.helper and ticket.assignedTo: + new_resolving_user = await env.db.user.find_unique( + where={"id": ticket.assignedTo.id} + ) + if new_resolving_user: + resolving_user = new_resolving_user + now = datetime.now() tkt = await env.db.ticket.update(