fixed issue for user_avatar if userid is not set

This commit is contained in:
Tim Gröger 2021-01-22 17:03:11 +01:00
parent cf5278d2e2
commit fe7166686d
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class User(db.Model, ModelSerializeMixin):
@property
def avatar_url(self):
return url_for("users.get_avatar", userid=self.userid)
return url_for("users.get_avatar", userid=self.userid) if self.userid else None
@property
def roles(self):