This commit is contained in:
parent
1a601b93eb
commit
b8266c41fc
|
@ -305,7 +305,7 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0):
|
||||||
shout_id = int(shout_id)
|
shout_id = int(shout_id)
|
||||||
scores[shout_id] = sr.get("score")
|
scores[shout_id] = sr.get("score")
|
||||||
hits_ids.append(shout_id)
|
hits_ids.append(shout_id)
|
||||||
shouts = await get_shouts_from_query(query_shouts())
|
shouts = local_session().execute(query_shouts())
|
||||||
for shout in shouts:
|
for shout in shouts:
|
||||||
shout.score = scores[int(shout.id)]
|
shout.score = scores[int(shout.id)]
|
||||||
shouts.sort(key=lambda x: x.score, reverse=True)
|
shouts.sort(key=lambda x: x.score, reverse=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user