trig
All checks were successful
deploy / deploy (push) Successful in 1m30s

This commit is contained in:
Untone 2023-12-25 00:02:54 +03:00
parent 88d33f96b0
commit c236768c07

View File

@ -167,9 +167,7 @@ async def get_author(_, _info, slug="", author_id=None):
authors = get_authors_from_query(q) authors = get_authors_from_query(q)
if authors: if authors:
author = authors[0] author = authors[0]
try:
with local_session() as session: with local_session() as session:
print(session)
comments_count = ( comments_count = (
session.query(Reaction) session.query(Reaction)
.filter( .filter(
@ -181,14 +179,7 @@ async def get_author(_, _info, slug="", author_id=None):
) )
.count() .count()
) )
print(author.id)
print(comments_count)
author.stat["commented"] = comments_count author.stat["commented"] = comments_count
except Exception as e:
import traceback
traceback.print_exc()
print(e)
else: else:
return {"error": "cant find author"} return {"error": "cant find author"}