remotes/1693045480750635534/spooky-22
Aevann1 2022-05-04 05:33:00 +02:00
parent 53702d5f13
commit 37bd922126
1 changed files with 5 additions and 4 deletions

View File

@ -392,10 +392,11 @@ class Comment(Base):
if not self.total_poll_voted(v): body += ' d-none'
body += f'"> - <a href="/votes?link=t3_{c.id}"><span id="poll-{c.id}">{c.upvotes}</span> votes</a></span></label></div>'
curr = self.total_choice_voted(v)
if curr: curr = " value=" + str(curr[0].comment_id)
else: curr = ''
body += f'<input class="d-none" id="current-{self.id}"{curr}>'
if self.choices:
curr = self.total_choice_voted(v)
if curr: curr = " value=" + str(curr[0].comment_id)
else: curr = ''
body += f'<input class="d-none" id="current-{self.id}"{curr}>'
for c in self.choices:
body += f'''<div class="custom-control"><input name="choice-{self.id}" autocomplete="off" class="custom-control-input" type="radio" id="{c.id}" onchange="choice_vote('{c.id}','{self.id}')"'''