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:
imacat authored and 依瑪貓 committed 2023-02-07 16:00:51 +08:00
1 parent dc24af1db0
commit 31dc8fab04
2 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -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: