Aevann 2023-09-18 19:48:16 +03:00
parent f0a5349519
commit cb2ce567f8
2 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,8 @@ class Comment(Base):
@lazy
def total_poll_voted(self, v):
if v:
if v.id == self.author_id:
return True
for o in self.options:
if o.voted(v): return True
return False

View File

@ -284,6 +284,8 @@ class Post(Base):
@lazy
def total_poll_voted(self, v):
if v:
if v.id == self.author_id:
return True
for o in self.options:
if o.voted(v): return True
return False