|
|
|
@ -204,6 +204,7 @@ class MonthlyOfferSummaryView(ListView): |
|
|
|
# Annotate notifications with month, then group by month and offerIdentifier |
|
|
|
# Annotate notifications with month, then group by month and offerIdentifier |
|
|
|
# Only include entries where offerIdentifier is not null |
|
|
|
# Only include entries where offerIdentifier is not null |
|
|
|
monthly_offers = ASSNotification.objects.exclude(offerIdentifier__isnull=True)\ |
|
|
|
monthly_offers = ASSNotification.objects.exclude(offerIdentifier__isnull=True)\ |
|
|
|
|
|
|
|
.filter(notificationType__in=['SUBSCRIBED', 'REFUND'])\ |
|
|
|
.annotate(month=TruncMonth('signedDate'))\ |
|
|
|
.annotate(month=TruncMonth('signedDate'))\ |
|
|
|
.values('month', 'offerIdentifier')\ |
|
|
|
.values('month', 'offerIdentifier')\ |
|
|
|
.annotate(count=Count('id'))\ |
|
|
|
.annotate(count=Count('id'))\ |
|
|
|
|