From 71c299c615fa81e97122a239a92e7c44333f2d3a Mon Sep 17 00:00:00 2001 From: aastabk Date: Wed, 16 Jul 2025 12:35:27 +0200 Subject: [PATCH] Completed order does not show in my orders and urgent orders --- src/staff/templatetags/order_tags.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/staff/templatetags/order_tags.py b/src/staff/templatetags/order_tags.py index 828e2b74..f0c520a5 100644 --- a/src/staff/templatetags/order_tags.py +++ b/src/staff/templatetags/order_tags.py @@ -26,7 +26,7 @@ def urgent_orders_table(context: dict, area: Area | None = None) -> dict: Order.objects.filter( is_urgent=True, ) - .exclude(status=Order.OrderStatus.DRAFT) + .exclude(status__in=[Order.OrderStatus.DRAFT, Order.OrderStatus.COMPLETED]) .select_related("genrequest") .annotate( priority=models.Case( @@ -162,7 +162,6 @@ def assigned_orders_table(context: dict) -> dict: status__in=[ Order.OrderStatus.PROCESSING, Order.OrderStatus.DELIVERED, - Order.OrderStatus.COMPLETED, ], responsible_staff=user, )