From b3d1490418b6e331e4498f2e6a007633c09cbb0c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 20 Dec 2022 00:08:13 +0200 Subject: [PATCH] do this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3266878#context --- files/classes/polls.py | 9 +++++++++ files/templates/poll_votes.html | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/files/classes/polls.py b/files/classes/polls.py index baeab7d18..c640fde41 100644 --- a/files/classes/polls.py +++ b/files/classes/polls.py @@ -36,6 +36,11 @@ class SubmissionOption(Base): if not v: return False return v.id in [x.user_id for x in self.votes] + @property + @lazy + def parent(self): + return self.post + class SubmissionOptionVote(Base): @@ -86,6 +91,10 @@ class CommentOption(Base): if not v: return False return v.id in [x.user_id for x in self.votes] + @property + @lazy + def parent(self): + return self.comment class CommentOptionVote(Base): diff --git a/files/templates/poll_votes.html b/files/templates/poll_votes.html index e18f84c74..df32e929c 100644 --- a/files/templates/poll_votes.html +++ b/files/templates/poll_votes.html @@ -5,7 +5,11 @@

{{thing.body_html | safe}} - {{ups | length}} {% if thing.exclusive == 2 %}bets{% else %}votes{% endif %}

-

Total voter truescore: {{total_ts}}

+

Link: {{thing.parent.permalink}}

+

Author: @{{thing.parent.author.username}}

+

Author Created At:

+

Author Truescore: {{"{:,}".format(thing.parent.author.truescore)}}

+

Total voter truescore: {{total_ts}}

{% if total_patrons %}

Total patrons: {{total_patrons}}

{% endif %}