search-with-images19
All checks were successful
Deploy on push / deploy (push) Successful in 1m8s

This commit is contained in:
Untone 2024-06-02 17:47:27 +03:00
parent 9d265fa3f9
commit db8472ae06

View File

@ -306,7 +306,7 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0):
shout_id = str(shout_id)
scores[shout_id] = sr.get("score")
hits_ids.append(shout_id)
shouts = local_session().execute(query_shouts()).unique()
[shouts] = local_session().execute(query_shouts())
for shout in shouts:
shout.score = scores[f"{shout.id}"]
shouts.sort(key=lambda x: x.score, reverse=True)