Changed the type hint of the "current_user" pseudo property of the AbstractUserUtils class to return None when the user has not logged in.
This commit is contained in:
1 parent
dc24af1db0
commit
31dc8fab04
2 files changed
+6
-5
No files matched your search
@@ -80,7 +80,7 @@ def create_app(is_testing: bool = False) -> Flask:
|
||||
return auth.User.id
|
||||
|
||||
@property
|
||||
def current_user(self) -> auth.User:
|
||||
def current_user(self) -> auth.User | None:
|
||||
return auth.current_user()
|
||||
|
||||
def get_by_username(self, username: str) -> auth.User | None:
|
||||
|
||||
Reference in new issue
Block a user