From 67c9496413940c8a7e6b45a1be64b825383098d6 Mon Sep 17 00:00:00 2001 From: jedi Date: Sat, 4 May 2024 00:43:40 +0200 Subject: [PATCH] stash --- core/notifications/dispatch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/notifications/dispatch.py b/core/notifications/dispatch.py index 4285852..294b2f9 100644 --- a/core/notifications/dispatch.py +++ b/core/notifications/dispatch.py @@ -43,7 +43,8 @@ class NotificationDispatcher: @database_sync_to_async def get_ticket(self, ticket_id): - return IssueThread.objects.get(id=ticket_id).prefetch_related('event') + return IssueThread.objects.filter(id=ticket_id).select_related('event').prefetch_related('state_changes', + 'assignments').first() async def run_forever(self): # Infinite loop to continuously listen for messages