fix(mixins): Use the correct test function
This commit is contained in:
parent
36ccc6be24
commit
ea3c5cf6fd
1 changed files with 2 additions and 2 deletions
|
@ -7,8 +7,8 @@ from dgsi.models import User
|
|||
class StaffRequiredMixin(UserPassesTestMixin):
|
||||
request: HttpRequest
|
||||
|
||||
def test_func(self) -> bool | None:
|
||||
if self.request.user.is_authenticated:
|
||||
def test_func(self) -> bool:
|
||||
if not self.request.user.is_authenticated:
|
||||
return False
|
||||
|
||||
assert isinstance(self.request.user, User)
|
||||
|
|
Loading…
Reference in a new issue