Skip to content

Commit

Permalink
verificacao de video existente para buscar recomendacoes
Browse files Browse the repository at this point in the history
  • Loading branch information
victorleaoo committed Sep 1, 2024
1 parent 3280460 commit 2bd96fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/controller/recommendationController.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ def get_recommendation_from_record(user_id: str =Query(...) , db: Session = Depe

# Gera lista de recomendações para cada vídeo no histórico
for video in videos_record:
videos_recommend = get_recommendations(int(video))
if videos_recommend: # Apenas adiciona recomendações se a lista não estiver vazia
recommendations.append(videos_recommend)
if video != "undefined":
videos_recommend = get_recommendations(int(video))
if videos_recommend: # Apenas adiciona recomendações se a lista não estiver vazia
recommendations.append(videos_recommend)

try:
for i in range(7):
Expand Down

0 comments on commit 2bd96fd

Please sign in to comment.