robustifie last_seen

This commit is contained in:
Emmanuel Viennet 2022-03-17 13:44:09 +01:00
parent 35f3d1841a
commit 87af662c65

View File

@ -173,7 +173,7 @@ class User(UserMixin, db.Model):
"id": self.id,
"active": self.active,
"status_txt": "actif" if self.active else "fermé",
"last_seen": self.last_seen.isoformat() + "Z",
"last_seen": self.last_seen.isoformat() + "Z" if self.last_seen else "",
"nom": (self.nom or ""), # sco8
"prenom": (self.prenom or ""), # sco8
"roles_string": self.get_roles_string(), # eg "Ens_RT, Ens_Info"