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

This commit is contained in:
Untone 2024-06-02 16:00:09 +03:00
parent 0abb4d605d
commit 17da2c8359

View File

@ -305,6 +305,8 @@ 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)
else:
assert "no id!!"
shouts = [] shouts = []
with local_session() as session: with local_session() as session:
shouts = session.query(Shout).filter(Shout.id.in_(hits_ids)).all() shouts = session.query(Shout).filter(Shout.id.in_(hits_ids)).all()