diff --git a/files/classes/badges.py b/files/classes/badges.py index 3be59fa9c..c751247d5 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -50,15 +50,9 @@ class Badge(Base): @property @lazy - def json_core(self): - + def json(self): return {'text': self.text, 'name': self.name, 'url': self.url, 'icon_url':f"https://{app.config['SERVER_NAME']}{self.path}" - } - - @property - @lazy - def json(self): - return self.json_core + } \ No newline at end of file diff --git a/files/classes/user.py b/files/classes/user.py index c8c6b26e1..645dbce37 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -434,6 +434,7 @@ class User(Base): 'coins': self.coins, 'post_count': self.post_count, 'comment_count': self.comment_count, + 'badges': [x.path for x in self.badges], } return data diff --git a/files/templates/comments.html b/files/templates/comments.html index 6074a4a1d..3e320bbac 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -40,7 +40,7 @@ -
+
@@ -758,7 +758,7 @@ {% include "expanded_image_modal.html" %} - + - + \ No newline at end of file