diff --git a/files/classes/flags.py b/files/classes/flags.py index c4406ce52..ac110e510 100644 --- a/files/classes/flags.py +++ b/files/classes/flags.py @@ -29,6 +29,12 @@ class Flag(Base): def realreason(self, v): return censor_slurs(self.reason, v) + #lazy hack to avoid having to rename the comment_id column and causing potential new bugs + @property + @lazy + def parent_id(self): + return self.post_id + class CommentFlag(Base): __tablename__ = "commentflags" @@ -50,3 +56,9 @@ class CommentFlag(Base): @lazy def realreason(self, v): return censor_slurs(self.reason, v) + + #lazy hack to avoid having to rename the comment_id column and causing potential new bugs + @property + @lazy + def parent_id(self): + return self.comment_id diff --git a/files/templates/comments.html b/files/templates/comments.html index 142fdcca5..bbf32caec 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -235,7 +235,7 @@ {% endif %} - {{macros.flags(c)}} + {{macros.flags(c, 'comment')}} {% if c.is_banned and c.ban_reason %}