fixes-inbox-topics-authors
This commit is contained in:
@@ -130,6 +130,7 @@ async def shouts_by_authors(_, _info, slugs, offset, limit):
|
||||
for a in s.authors:
|
||||
a.caption = await ShoutAuthorStorage.get_author_caption(s.slug, a.slug)
|
||||
shouts_prepared.append(s)
|
||||
shouts_prepared = list(set(shouts_prepared))
|
||||
shouts_prepared.sort(key=lambda s: s.publishedAt, reverse=True)
|
||||
return shouts_prepared[offset : offset + limit]
|
||||
|
||||
@@ -146,6 +147,7 @@ async def shouts_by_topics(_, _info, slugs, offset, limit):
|
||||
for a in s.authors:
|
||||
a.caption = await ShoutAuthorStorage.get_author_caption(s.slug, a.slug)
|
||||
shouts_prepared.append(s)
|
||||
shouts_prepared = list(set(shouts_prepared))
|
||||
shouts_prepared.sort(key=lambda s: s.publishedAt, reverse=True)
|
||||
return shouts_prepared[offset : offset + limit]
|
||||
|
||||
|
Reference in New Issue
Block a user