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:
@@ -92,7 +92,7 @@ def test_public_profile_hides_personal_fields_until_the_user_opts_in(client, use
|
||||
)
|
||||
event = event_factory(slug="public-profile-event")
|
||||
Registration.objects.create(event=event, user=member, status=Registration.StatusChoices.CONFIRMED)
|
||||
draft_event = event_factory(slug="private-profile-event", status=Event.StatusChoices.DRAFT)
|
||||
draft_event = event_factory(slug="private-profile-event", is_published=False)
|
||||
Registration.objects.create(event=draft_event, user=member, status=Registration.StatusChoices.ATTENDED)
|
||||
|
||||
public_path = f"/api/auth/public-profile/{member.username}"
|
||||
|
||||
Reference in New Issue
Block a user