This commit is contained in:
Aevann1 2022-01-02 02:06:46 +02:00
parent 123cc81604
commit d456aaa0c7
18 changed files with 119 additions and 119 deletions

View file

@ -74,7 +74,7 @@ class Comment(Base):
@lazy
def poll_voted(self, v):
if v:
vote = g.db.query(CommentVote).filter_by(user_id=v.id, comment_id=self.id).first()
vote = g.db.query(CommentVote).filter_by(user_id=v.id, comment_id=self.id).one_or_none()
if vote: return vote.vote_type
else: return None
else: return None