Skip to content
Snippets Groups Projects
Commit c38cedc4 authored by Mariusz Trela's avatar Mariusz Trela
Browse files

Fix in `get_state`

parent f51c7e79
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!297get state fix
...@@ -138,7 +138,7 @@ async def get_state(context, path: str): ...@@ -138,7 +138,7 @@ async def get_state(context, path: str):
sort = valid_sort(part[0]) sort = valid_sort(part[0])
tag = valid_tag(part[1].lower(), allow_empty=True) tag = valid_tag(part[1].lower(), allow_empty=True)
pids = await get_posts_by_given_sort(context, sort, '', '', 20, tag) pids = await get_posts_by_given_sort(context, sort, '', '', 20, tag)
state['content'] = _keyed_posts(await load_posts(db, pids)) state['content'] = _keyed_posts(pids)
state['discussion_idx'] = {tag: {sort: list(state['content'].keys())}} state['discussion_idx'] = {tag: {sort: list(state['content'].keys())}}
state['tag_idx'] = {'trending': await get_top_trending_tags_summary(context)} state['tag_idx'] = {'trending': await get_top_trending_tags_summary(context)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment