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):
|
class StaffRequiredMixin(UserPassesTestMixin):
|
||||||
request: HttpRequest
|
request: HttpRequest
|
||||||
|
|
||||||
def test_func(self) -> bool | None:
|
def test_func(self) -> bool:
|
||||||
if self.request.user.is_authenticated:
|
if not self.request.user.is_authenticated:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
assert isinstance(self.request.user, User)
|
assert isinstance(self.request.user, User)
|
||||||
|
|
Loading…
Reference in a new issue