captionfix-2
Some checks failed
Deploy on push / deploy (push) Failing after 10s

This commit is contained in:
Untone 2024-10-31 15:10:26 +03:00
parent 7eed615991
commit bf3fd4b39a

View File

@ -44,13 +44,14 @@ def query_shouts(slug=None, shout_id=None):
"id", Author.id,
"name", Author.name,
"slug", Author.slug,
"pic", Author.pic,
"caption", ShoutAuthor.caption,
"pic", Author.pic
)
).label("authors"),
).label("authors")
)
.select_from(ShoutAuthor)
.join(Author, ShoutAuthor.author == Author.id)
.group_by(ShoutAuthor.shout)
.where(ShoutAuthor.shout == Shout.id)
.correlate(Shout)
.scalar_subquery()
)
@ -164,8 +165,7 @@ def get_shouts_with_stats(q, limit=20, offset=0, author_id=None):
"id", Author.id,
"name", Author.name,
"slug", Author.slug,
"pic", Author.pic,
"caption", ShoutAuthor.caption,
"pic", Author.pic
)
).label("authors")
)