mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Don't hard-code class names when calling static methods
normalize_email should be called on the instance, not the class. This has the same effect normally but is more helpful to subclassers. When methods are called directly on the class, subclasses can't override them.
This commit is contained in:
@@ -939,7 +939,7 @@ authentication app::
|
||||
raise ValueError('Users must have an email address')
|
||||
|
||||
user = self.model(
|
||||
email=MyUserManager.normalize_email(email),
|
||||
email=self.normalize_email(email),
|
||||
date_of_birth=date_of_birth,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user