forked from rDrama/rDrama
do this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4996103#context
parent
f0a5349519
commit
cb2ce567f8
|
@ -351,6 +351,8 @@ class Comment(Base):
|
||||||
@lazy
|
@lazy
|
||||||
def total_poll_voted(self, v):
|
def total_poll_voted(self, v):
|
||||||
if v:
|
if v:
|
||||||
|
if v.id == self.author_id:
|
||||||
|
return True
|
||||||
for o in self.options:
|
for o in self.options:
|
||||||
if o.voted(v): return True
|
if o.voted(v): return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -284,6 +284,8 @@ class Post(Base):
|
||||||
@lazy
|
@lazy
|
||||||
def total_poll_voted(self, v):
|
def total_poll_voted(self, v):
|
||||||
if v:
|
if v:
|
||||||
|
if v.id == self.author_id:
|
||||||
|
return True
|
||||||
for o in self.options:
|
for o in self.options:
|
||||||
if o.voted(v): return True
|
if o.voted(v): return True
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue