This commit is contained in:
parent
d83b459408
commit
ebf1309b48
|
@ -306,9 +306,11 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0):
|
||||||
shout_id = str(shout_id)
|
shout_id = str(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] = local_session().execute(query_shouts()).unique()
|
result = local_session().execute(query_shouts()).unique()
|
||||||
for shout in shouts:
|
shouts = []
|
||||||
|
for shout in result:
|
||||||
shout.score = scores[f"{shout.id}"]
|
shout.score = scores[f"{shout.id}"]
|
||||||
|
shouts.append(shout)
|
||||||
shouts.sort(key=lambda x: x.score, reverse=True)
|
shouts.sort(key=lambda x: x.score, reverse=True)
|
||||||
return shouts
|
return shouts
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user