This commit is contained in:
parent
25964b6797
commit
6b8b61fa37
|
@ -306,11 +306,14 @@ 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)
|
||||||
result = local_session().execute(query_shouts().filter(Shout.id.in_(hits_ids))).all()
|
|
||||||
|
shouts_query = query_shouts().filter(Shout.id.in_(hits_ids))
|
||||||
|
shouts = []
|
||||||
|
with local_session() as session:
|
||||||
|
result = session.execute(shouts_query).all()
|
||||||
if result:
|
if result:
|
||||||
logger.debug(result)
|
logger.debug(result)
|
||||||
logger.debug(len(result))
|
logger.debug(len(result))
|
||||||
shouts = []
|
|
||||||
for shout in result:
|
for shout in result:
|
||||||
logger.debug(shout)
|
logger.debug(shout)
|
||||||
shout.score = scores[f"{shout.id}"]
|
shout.score = scores[f"{shout.id}"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user