diff --git a/resolvers/reader.py b/resolvers/reader.py index 288f35b9..bc3f31d5 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -287,7 +287,9 @@ async def load_shouts_feed(_, info, options): async def load_shouts_search(_, _info, text, limit=50, offset=0): if text and len(text) > 2: results = await SearchService.search(text, limit, offset) - results_dict = {[s["slug"]]: s for s in results} # { slug, title, score } + results_dict = {} + for r in results: + results_dict[r["slug"]] = r q = ( select(Shout) # Add "score" column .options(