From fffeb5df554c93f0f9e634a820323b4771e9bfc7 Mon Sep 17 00:00:00 2001 From: Premkumar Chalmeti Date: Mon, 9 Aug 2021 14:06:55 +0530 Subject: [PATCH] Removed redundant definition of UserModel in ModelBackend.with_perm(). --- django/contrib/auth/backends.py | 1 - 1 file changed, 1 deletion(-) diff --git a/django/contrib/auth/backends.py b/django/contrib/auth/backends.py index ac86749e533..0ddbd9ca77d 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()