change return in recs function

This commit is contained in:
Maciej Czajka 2023-01-14 00:00:35 +01:00
parent 150916879f
commit f4e4ed02c7

View File

@ -129,4 +129,6 @@ async def recs(production_id: str, count: int | None = 5):
print(f'time elapsed = {time.time() - time_start}') print(f'time elapsed = {time.time() - time_start}')
scores = [idx[0] for idx in sorted(scores, key=lambda x: x[1], reverse=True)[:count+1]] scores = [idx[0] for idx in sorted(scores, key=lambda x: x[1], reverse=True)[:count+1]]
scores.remove(production_id) scores.remove(production_id)
return scores return {
'id': scores
}