Skip to content

fix(members): fall back to today for age flags when tournament dates are TBD - #98

Merged
ethnjs merged 3 commits into
mainfrom
fix/age-flag-tbd-fallback
Sep 30, 2026
Merged

ethnjs merged 3 commits into
mainfrom
fix/age-flag-tbd-fallback

Conversation

@ethnjs

@ethnjs ethnjs commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Age flags showed Unknown for every member of a tournament whose primary tracks have TBD dates, because there was no first day to measure age against. They now fall back to today's date in the tournament's timezone.

What changed

Backend

Logic

  • TournamentMembership.is_over_18 / is_over_21 measure age against tournament.first_day, or today in the tournament's timezone when it's None. They're null only when the user has no date of birth.
  • seed_members records age disclosure consent when the tournament collects an age flag (--no-age-consent to skip), matching what redeeming a join code does.

Out of scope

  • Telling "no date of birth" apart from other unknowns in the UI.

Test plan

  • pytest passes locally
  • No migration needed — the flags are derived, not stored
  • Clicked through the UI change in a browser

Automated

  • test_memberships.py — age flags fall back to today on a TBD tournament.

Manual

  • Tournament with an undated primary track and both age toggles on, seeded members → flags show 18+ / Under 21 instead of Unknown.

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nexus Ready Ready Preview Sep 30, 2026 6:48am UTC

@railway-app

railway-app Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the nexus-pr-98 environment in nexus

Service Status Web Updated
nexus ✅ Success (View Logs) Sep 30, 2026 at 6:48 am UTC

@railway-app
railway-app Bot temporarily deployed to nexus / nexus-pr-98 September 30, 2026 06:47 Destroyed
@ethnjs
ethnjs merged commit ddaf41a into main Sep 30, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4d153448 Deployed Sep 30, 2026 by vercel[bot]
nexus / nexus-pr-98 — 4d153448 Deployed Sep 30, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant