Removed redundant definition of UserModel in ModelBackend.with_perm().

This commit is contained in:
Premkumar Chalmeti 2021-08-09 14:06:55 +05:30 committed by GitHub
parent fc2bd40fc7
commit fffeb5df55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -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()