From 9d265fa3f9e8a79817cdf382d8f777497f367f3e Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 2 Jun 2024 17:36:34 +0300 Subject: [PATCH] search-with-images17 --- resolvers/reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resolvers/reader.py b/resolvers/reader.py index 229476dc..e3738cbe 100644 --- a/resolvers/reader.py +++ b/resolvers/reader.py @@ -303,12 +303,12 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0): for sr in results: shout_id = sr.get("id") if shout_id: - shout_id = int(shout_id) + shout_id = str(shout_id) scores[shout_id] = sr.get("score") hits_ids.append(shout_id) shouts = local_session().execute(query_shouts()).unique() for shout in shouts: - shout.score = scores[int(shout.id)] + shout.score = scores[f"{shout.id}"] shouts.sort(key=lambda x: x.score, reverse=True) return shouts return []