This commit is contained in:
@@ -305,12 +305,11 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0):
|
||||
shout_id = int(shout_id)
|
||||
scores[shout_id] = sr.get("score")
|
||||
hits_ids.append(shout_id)
|
||||
shouts = []
|
||||
with local_session() as session:
|
||||
shouts = session.execute(query_shouts())
|
||||
for shout in shouts:
|
||||
shout.score = scores[int(shout.id)]
|
||||
return shouts.unique()
|
||||
shouts = get_shouts_from_query(query_shouts())
|
||||
for shout in shouts:
|
||||
shout.score = scores[int(shout.id)]
|
||||
shouts.sort(key=lambda x: x.score, reverse=True)
|
||||
return shouts
|
||||
return []
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user