From 79b0e77d44250574a94aa627e367b68f9ea6eab5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 19 Jan 2022 16:08:45 +0200 Subject: [PATCH] fds --- files/classes/comment.py | 21 +++++++++------------ files/routes/comments.py | 2 +- files/templates/comments.html | 3 --- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 623c21e03..39c113026 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -357,6 +357,15 @@ class Comment(Base): g.db.add(self.author) g.db.commit() + for o in self.options: + body += f'
' + return body def plainbody(self, v): @@ -406,18 +415,6 @@ class Comment(Base): @lazy def active_flags(self): return self.flags.count() - def options_html(self, v): - html = "" - for o in self.options: - html += f'
' - return html - class Notification(Base): __tablename__ = "notifications" diff --git a/files/routes/comments.py b/files/routes/comments.py index b8c2344d2..a771710bb 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -706,7 +706,7 @@ def edit_comment(cid, v): g.db.commit() - return c.realbody(v) + c.options_html(v) + return c.realbody(v) @app.post("/delete/comment/") diff --git a/files/templates/comments.html b/files/templates/comments.html index 49ab78076..d39963fca 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -250,9 +250,6 @@
{{c.realbody(v) | safe}} - {% if c.options %} - {{c.options_html(v) | safe}} - {% endif %} {% if c.author.sig_html and c.author_name != '👻' and (c.author_id == MOOSE_ID or not (v and v.sigs_disabled)) %}