feat: derive event lifecycle status from dates and flags
Replace persisted event statuses with publication and cancellation flags, and compute public lifecycle labels from event timing and registration capacity. Keep filters, registration checks, and profile responses aligned with the derived status.
This commit is contained in:
@@ -37,7 +37,7 @@ class TestRegistrationCheckout:
|
||||
slug=f"checkout-{suffix}",
|
||||
price=1250000,
|
||||
capacity=1,
|
||||
status=Event.StatusChoices.PUBLISHED,
|
||||
is_published=True,
|
||||
)
|
||||
|
||||
def auth_headers(self):
|
||||
@@ -509,8 +509,8 @@ class TestRegistrationCheckout:
|
||||
from apps.payments.tasks import sweep_stale_payment_verifications
|
||||
|
||||
enqueue = mocker.patch("apps.payments.tasks.reconcile_payment.apply_async")
|
||||
self.event.status = Event.StatusChoices.CANCELLED
|
||||
self.event.save(update_fields=["status"])
|
||||
self.event.is_cancelled = True
|
||||
self.event.save(update_fields=["is_cancelled"])
|
||||
|
||||
cancelled = cancel_event_checkouts(self.event.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user