From fe7166686da1a8142075c7e9d0924fc7b90b4d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 22 Jan 2021 17:03:11 +0100 Subject: [PATCH] fixed issue for user_avatar if userid is not set --- flaschengeist/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flaschengeist/models/user.py b/flaschengeist/models/user.py index f69ea1f..0d9d506 100644 --- a/flaschengeist/models/user.py +++ b/flaschengeist/models/user.py @@ -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):