Skip to content

Handle usernames without email addresses - #1084

Open
PeterBeattie19 wants to merge 1 commit into
OneZoom:mainfrom
PeterBeattie19:fix/email-for-username-none
Open

PeterBeattie19 wants to merge 1 commit into
OneZoom:mainfrom
PeterBeattie19:fix/email-for-username-none

Conversation

@PeterBeattie19

@PeterBeattie19 PeterBeattie19 commented Aug 30, 2026

Copy link
Copy Markdown

Closes #1069.

Summary

  • return None from email_for_username() when no email address exists
    • Note: I think it's better to return None instead of raising a dedicated Exception for "no email", since a user not having an assigned email is tolerated by the system.
  • skip renewal reminders for users who cannot receive email
  • update renewal consumers for the nullable email contract
  • add regression coverage for email-less users

Testing

  • python3 -m py_compile modules/usernames.py modules/sponsorship.py controllers/manage.py tests/unit/test_modules_usernames.py tests/unit/test_modules_sponsorship.py
  • git diff --check

The targeted web2py tests require the project's MySQL-backed test database, which is not available in the local environment.

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.

Sponsorship renewals expect e-mail addresses

1 participant