summaryrefslogtreecommitdiff
path: root/django/contrib/auth/base_user.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/auth/base_user.py')
-rw-r--r--django/contrib/auth/base_user.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/auth/base_user.py b/django/contrib/auth/base_user.py
index 0c9538d69d..5bb88ac4dd 100644
--- a/django/contrib/auth/base_user.py
+++ b/django/contrib/auth/base_user.py
@@ -36,6 +36,9 @@ class BaseUserManager(models.Manager):
def get_by_natural_key(self, username):
return self.get(**{self.model.USERNAME_FIELD: username})
+ async def aget_by_natural_key(self, username):
+ return await self.aget(**{self.model.USERNAME_FIELD: username})
+
class AbstractBaseUser(models.Model):
password = models.CharField(_("password"), max_length=128)