Skip to content

Commit 39a7723

Browse files
committed
fixup! 🚸(email) we should ignore case when looking for existing emails
1 parent 29c62db commit 39a7723

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ and this project adheres to
2020

2121
### Changed
2222

23+
- 🚸(email) we should ignore case when looking for existing emails #1056
2324
- 🏗️(core) migrate from pip to uv
2425
- ✨(front) add show invitations mails domains access #1040
25-
- 🚸(email) we should ignore case when looking for existing emails #1056
2626

2727
## [1.22.2] - 2026-01-26
2828

src/backend/core/tests/test_models_invitations.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,11 @@ def test_models_invitations_email_case_insensitive_duplicate_check():
5555
# Create a user with a lowercase email
5656
factories.UserFactory(email="john.doe@example.com")
5757

58-
# Try to create an invitation with uppercase email - should fail
58+
# Try to create an invitation with different case
59+
# This should raise the same exception as if the email was exactly the same
5960
with pytest.raises(EmailAlreadyKnownException):
6061
factories.InvitationFactory(email="John.Doe@Example.COM")
6162

62-
# Try with mixed case - should also fail
63-
with pytest.raises(EmailAlreadyKnownException):
64-
factories.InvitationFactory(email="JOHN.DOE@EXAMPLE.COM")
65-
6663

6764
def test_models_invitations_team_should_be_team_instance():
6865
"""The "team" field should be a team instance."""

src/backend/mailbox_manager/tests/api/invitations/test_api_domain_invitations_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_api_domain_invitations__inviting_known_email_case_insensitive():
169169
client = APIClient()
170170
client.force_login(access.user)
171171

172-
# Try to invite with uppercase email - should create access for existing user
172+
# Try to invite with same email different case - should create access for existing user
173173
response = client.post(
174174
f"/api/v1.0/mail-domains/{access.domain.slug}/invitations/",
175175
{

0 commit comments

Comments
 (0)