diff options
| author | Bona Fide IT GmbH <137388433+BonaFideIT@users.noreply.github.com> | 2025-04-23 14:01:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-23 13:01:19 +0100 |
| commit | 19067fe85a32a51703b7ed29626a30e00899007f (patch) | |
| tree | 71c18159e677400a948c79c90bee393c9b51426c /django/contrib/auth | |
| parent | 1bc805e23b73a580b82a1d416ab0fb59a1073047 (diff) | |
Simplified UserManager.with_perm() by using get_backends().
Diffstat (limited to 'django/contrib/auth')
| -rw-r--r-- | django/contrib/auth/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 7be06e3d96..7c5890a00f 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -215,9 +215,9 @@ class UserManager(BaseUserManager): self, perm, is_active=True, include_superusers=True, backend=None, obj=None ): if backend is None: - backends = auth._get_backends(return_tuples=True) + backends = auth.get_backends() if len(backends) == 1: - backend, _ = backends[0] + backend = backends[0] else: raise ValueError( "You have multiple authentication backends configured and " |
