diff --git a/backend/app/routes/playlists.py b/backend/app/routes/playlists.py index 646dcf3d..1256a6e1 100644 --- a/backend/app/routes/playlists.py +++ b/backend/app/routes/playlists.py @@ -587,8 +587,10 @@ def move_item( item.position = _next_item_position(db, dst.id) db.flush() dst_changed = True + # silent-ok: the conflict IS the answer — the target already holds the video, which is the + # idempotent outcome; the savepoint put the row back in the source list, dropped below. except IntegrityError: - pass # the savepoint put the row back in the source list; drop it below + pass if not dst_changed: db.delete(item) # The source always changed; the target only when the row landed in it. `_touch` on a target