From 1434b1cbf8d2352a1c4a1d0c63603982c297a191 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 16 Oct 2020 22:48:55 -0500 Subject: [PATCH] Display open ticket to assignees --- judge/views/blog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/views/blog.py b/judge/views/blog.py index 3dee66b..9a5744d 100644 --- a/judge/views/blog.py +++ b/judge/views/blog.py @@ -86,7 +86,7 @@ class PostList(ListView): if self.request.user.is_authenticated: profile = self.request.profile - context['own_open_tickets'] = (Ticket.objects.filter(user=profile, is_open=True).order_by('-id') + context['own_open_tickets'] = (Ticket.objects.filter(Q(user=profile) | Q(assignees__in=[profile]), is_open=True).order_by('-id') .prefetch_related('linked_item').select_related('user__user')) else: profile = None