Skip to content

Make email optional on Leadership records - #210

Merged
calebyhan merged 1 commit into
mainfrom
207/optional-leadership-email
Aug 22, 2026
Merged

Make email optional on Leadership records#210
calebyhan merged 1 commit into
mainfrom
207/optional-leadership-email

Conversation

@calebyhan

Copy link
Copy Markdown
Contributor

Previous leadership records often don't have a known or current email address, but the leadership table's email column was required end-to-end (DB column, create schema, and admin form), which blocked uploading that historical data.

Changes:

  • Made email nullable on the Leadership model (was nullable=False)
  • Updated LeadershipDTO/CreateLeadershipDTO to allow None for email (UpdateLeadershipDTO already allowed it)
  • Removed the required attribute and asterisk from the email field in the admin Leadership form, and send null instead of an empty string when left blank
  • Updated Leadership/CreateLeadership/AdminLeadership frontend types to allow null email
  • Guarded the mailto: link on the public leadership page so it only renders when an email is present
  • Added a test covering leadership creation without an email

Note: existing deployed databases will need a manual ALTER TABLE leadership ALTER COLUMN email DROP NOT NULL since there's no migration tooling in this repo — the schema is created via metadata.create_all().

Closes #207

Allows uploading previous leadership records without an email address.
@github-actions

Copy link
Copy Markdown

Test Results

589 tests  +1   589 ✅ +1   50s ⏱️ +16s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit d71a960. ± Comparison against base commit b5ceec3.

@MasonMines2006 MasonMines2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@calebyhan
calebyhan merged commit 6e4c3fa into main Aug 22, 2026
3 checks passed
@calebyhan
calebyhan deleted the 207/optional-leadership-email branch August 22, 2026 02:16
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.

Make email optional on Leadership records

2 participants