Add debug to troubleshoot issue #38
This commit is contained in:
parent
bc54be237b
commit
976beade85
15
app/model.py
15
app/model.py
@ -317,10 +317,17 @@ class PlaylistTracks(Base):
|
|||||||
else:
|
else:
|
||||||
# Destination playlist has tracks; add to end
|
# Destination playlist has tracks; add to end
|
||||||
new_row = max_row + 1
|
new_row = max_row + 1
|
||||||
record = session.query(PlaylistTracks).filter(
|
try:
|
||||||
PlaylistTracks.playlist_id == from_playlist_id,
|
record = session.query(PlaylistTracks).filter(
|
||||||
PlaylistTracks.row == row
|
PlaylistTracks.playlist_id == from_playlist_id,
|
||||||
).one()
|
PlaylistTracks.row == row).one()
|
||||||
|
except NoResultFound:
|
||||||
|
# Issue #38?
|
||||||
|
ERROR(
|
||||||
|
f"No rows matched in query: "
|
||||||
|
f"PlaylistTracks.playlist_id == {from_playlist_id}, "
|
||||||
|
f"PlaylistTracks.row == {row}"
|
||||||
|
)
|
||||||
record.playlist_id = to_playlist_id
|
record.playlist_id = to_playlist_id
|
||||||
record.row = new_row
|
record.row = new_row
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user