coroutine-fix

This commit is contained in:
tonyrewin 2022-10-01 13:28:55 +03:00
parent 7381446edf
commit 88b08882bf

View File

@ -121,7 +121,7 @@ async def get_search_results(_, _info, searchtext, offset, limit):
async def shouts_by_authors(_, _info, slugs, offset, limit):
shouts = []
for author in slugs:
shouts.extend(ShoutsCache.get_by_author(author))
shouts.extend(await ShoutsCache.get_by_author(author))
shouts_prepared = []
for s in shouts:
if bool(s.publishedAt):
@ -136,7 +136,7 @@ async def shouts_by_authors(_, _info, slugs, offset, limit):
async def shouts_by_topics(_, _info, slugs, offset, limit):
shouts = []
for topic in slugs:
shouts.extend(ShoutsCache.get_by_topic(topic))
shouts.extend(await ShoutsCache.get_by_topic(topic))
shouts_prepared = []
for s in shouts:
if bool(s.publishedAt):