From ac37f15bea290881e6d4b674e8015ddeccf8eb76 Mon Sep 17 00:00:00 2001 From: Ali Asadi Date: Mon, 3 Aug 2026 17:33:59 +0330 Subject: [PATCH] FIX(promotions): default event status promotion_amount to 0 get_event_status_for_user returned None whenever the event was already processed, no plan matched, or the user lacked access to the recipient. Callers now always get a concrete amount: the real payout if accessible, 0 otherwise. Co-Authored-By: Claude Sonnet 5 --- apps/promotions/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/promotions/models.py b/apps/promotions/models.py index 269eda1..ae8c384 100644 --- a/apps/promotions/models.py +++ b/apps/promotions/models.py @@ -393,7 +393,7 @@ class PromotionQuerySet(models.QuerySet): def get_event_status_for_user(user_uuid, event_label): processed = Promotion.objects.is_processed_for_user(user_uuid, event_label) - promotion_amount = None + promotion_amount = 0 if not processed: plan = Plan.objects.filter(event_list__icontains=event_label).first() if plan: