Skip to content

Commit 298bbe5

Browse files
committed
feat : 일기 중복 저장 삭제
1 parent bbc9e85 commit 298bbe5

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

app/diary/router.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ async def create_diary_with_emotion_based_recommendation(
555555

556556
emotion_to_genres = {
557557
0: ["댄스", "록/메탈"],
558-
1: ["R&B/Soul", "댄스"],
558+
1: ["인디음악", "댄스"],
559559
2: ["인디음악", "R&B/Soul"],
560560
3: ["R&B/Soul", "인디음악"],
561561
4: ["R&B/Soul", "인디음악"],
@@ -719,20 +719,6 @@ async def create_diary_with_emotion_based_recommendation(
719719
"best_lyric": song_data.best_lyric,
720720
"similarity_score": song_data.similarity_score,
721721
})
722-
723-
for song_data in recommended_songs:
724-
new_song = RecommendedSong(
725-
diary_id=new_diary.id,
726-
song_id=song_data["song_id"],
727-
song_name=song_data["song_name"],
728-
artist=song_data["artist"],
729-
genre=song_data["genre"],
730-
album_image=song_data["album_image"],
731-
best_lyric=song_data["best_lyric"],
732-
similarity_score=song_data["similarity_score"]
733-
)
734-
session.add(new_song)
735-
736722
session.commit()
737723

738724
response_data = {

0 commit comments

Comments
 (0)