Skip to content
Snippets Groups Projects
Commit 7c80912b authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Db: User: Funkce na zjištění doposud nepřihlášení

parent ff66d732
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !82. Comments created here will be created in the context of that merge request.
...@@ -303,6 +303,9 @@ class User(Base): ...@@ -303,6 +303,9 @@ class User(Base):
def name_sort_key(self) -> Tuple[str, str]: def name_sort_key(self) -> Tuple[str, str]:
return (locale.strxfrm(self.last_name), locale.strxfrm(self.first_name)) return (locale.strxfrm(self.last_name), locale.strxfrm(self.first_name))
def is_inactive(self) -> bool:
  • Tohle se v Pythonu obvykle píše jako is None místo == None. Obecně není zvykem spoléhat, že každý typ implementuje porovnávání tak, aby na pravé straně akceptovalo None.

  • Please register or sign in to reply
return self.password_hash == None
class Contest(Base): class Contest(Base):
__tablename__ = 'contests' __tablename__ = 'contests'
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment