main
Laurent 8 months ago
parent e95d3b5835
commit 82d5b4ca87
  1. 1
      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'))\

Loading…
Cancel
Save