Skip to content

Commit

Permalink
count ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
leduythuccs committed Dec 12, 2024
1 parent e6f4651 commit f1fd7c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions judge/template_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ def general_info(request):
}
if request.user.is_staff:
context['ticket_count'] = Ticket.objects.filter(is_open=True).count()
else:
context['ticket_count'] = Ticket.objects.filter(user=request.user).count()
return context


Expand Down

0 comments on commit f1fd7c4

Please sign in to comment.