linter-update
Some checks failed
Deploy to core / deploy (push) Failing after 50s

This commit is contained in:
2024-02-17 13:18:54 +03:00
parent 92246bc9d1
commit 8a4e4ce6d5
4 changed files with 9 additions and 100 deletions

View File

@@ -170,12 +170,12 @@ async def load_author_with_stats(q):
)
likes_count = (
session.query(AuthorRating)
.filter(and_(AuthorRating.author == author.id, AuthorRating.plus == True))
.filter(and_(AuthorRating.author == author.id, AuthorRating.plus.is_(True)))
.count()
)
dislikes_count = (
session.query(AuthorRating)
.filter(and_(AuthorRating.author == author.id, AuthorRating.plus != True))
.filter(and_(AuthorRating.author == author.id, AuthorRating.plus.is_not(True)))
.count()
)
author.stat['rating'] = likes_count - dislikes_count