fixed issue for user_avatar if userid is not set
This commit is contained in:
parent
cf5278d2e2
commit
fe7166686d
|
@ -67,7 +67,7 @@ class User(db.Model, ModelSerializeMixin):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def avatar_url(self):
|
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
|
@property
|
||||||
def roles(self):
|
def roles(self):
|
||||||
|
|
Loading…
Reference in New Issue