-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save user emails lowercase (DEV-1164) #795
Conversation
Reviewer's Guide by SourceryThis PR implements DEV-1164 by ensuring that user emails are saved in lowercase. It modifies the Sequence diagram for email lowercase conversion during user savesequenceDiagram
participant Client
participant User
participant Database
Client->>User: save(email='Test@Example.com')
activate User
Note over User: Convert email to lowercase
User->>User: email = email.lower()
User->>Database: save user with email='test@example.com'
Database-->>User: confirmation
User-->>Client: saved user
deactivate User
Class diagram showing User model changesclassDiagram
class User {
+email: str
+save(*args, **kwargs)
}
note for User "Modified save() method to convert email to lowercase"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mikefeldberg - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
||
def test_save(self) -> None: | ||
user = User.objects.create(username="lowercaseme", email="LOWERCASEME@EXAMPLE.COM") | ||
self.assertEqual(user.email, "lowercaseme@example.com") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the login code also downcase the input? @mikefeldberg
DEV-1164
Summary by Sourcery
Bug Fixes: