Fixing video search bug.

This commit is contained in:
Roland 2021-12-31 20:28:51 -07:00
parent a95cbd74c9
commit 3f7145c940
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
2 changed files with 9 additions and 3 deletions

View file

@ -139,8 +139,9 @@ def video_search(
total = results[0]['total'] if results else 0
ranked_ids = [i['id'] for i in results]
results = get_ranked_models(ranked_ids, Video)
results = [i.__json__() for i in results]
with get_db_session() as session:
results = get_ranked_models(ranked_ids, Video, session=session)
results = [i.__json__() for i in results]
return results, total