From 82d5b4ca874a8fb1a4996e8cdfd426903f7b04c1 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 5 Mar 2025 14:15:03 +0100 Subject: [PATCH] fix count --- subscriptions/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/subscriptions/views.py b/subscriptions/views.py index 61b21e5..9b4de67 100644 --- a/subscriptions/views.py +++ b/subscriptions/views.py @@ -204,6 +204,7 @@ class MonthlyOfferSummaryView(ListView): # Annotate notifications with month, then group by month and offerIdentifier # Only include entries where offerIdentifier is not null monthly_offers = ASSNotification.objects.exclude(offerIdentifier__isnull=True)\ + .filter(notificationType__in=['SUBSCRIBED', 'REFUND'])\ .annotate(month=TruncMonth('signedDate'))\ .values('month', 'offerIdentifier')\ .annotate(count=Count('id'))\