diff --git a/django/contrib/auth/backends.py b/django/contrib/auth/backends.py index ac86749e53..0ddbd9ca77 100644 --- a/django/contrib/auth/backends.py +++ b/django/contrib/auth/backends.py @@ -134,7 +134,6 @@ class ModelBackend(BaseBackend): 'The `perm` argument must be a string or a permission instance.' ) - UserModel = get_user_model() if obj is not None: return UserModel._default_manager.none()