fix-select-by-topic
All checks were successful
Deploy on push / deploy (push) Successful in 1m9s

This commit is contained in:
Untone 2024-06-06 12:23:47 +03:00
parent ddc5254e5f
commit ae861aa8b4

View File

@ -113,7 +113,11 @@ async def load_authors_by(_, _info, by, limit, offset):
authors_query = authors_query.filter(Author.name.ilike(f"%{by['name']}%"))
elif by.get("topic"):
authors_query = (
authors_query.join(ShoutAuthor).join(ShoutTopic).join(Topic).where(Topic.slug == str(by["topic"]))
authors_query
.join(ShoutAuthor)
.join(ShoutTopic, ShoutAuthor.topic_id == ShoutTopic.id)
.join(Topic, ShoutTopic.topic_id == Topic.id)
.filter(Topic.slug == str(by["topic"]))
)
if by.get("last_seen"): # in unix time