diff --git a/uniticket/api_rest/views/manager.py b/uniticket/api_rest/views/manager.py index b490934..070c3ce 100644 --- a/uniticket/api_rest/views/manager.py +++ b/uniticket/api_rest/views/manager.py @@ -62,6 +62,8 @@ def get(self, request, structure_slug, *args, **kwargs): ticket_ids = TicketAssignment.objects.filter( office__organizational_structure=structure, office__is_active=True, + ticket__is_closed=False, + follow_check=True ).values_list('ticket__pk', flat=True).distinct() messages = TicketReply.get_unread_messages_count(ticket_ids=ticket_ids) return Response({'count': messages})