fix(playlists): the move's conflict fallback says why it is silent
The house guard requires a silent handler to carry a silent-ok note; the
savepoint fallback added in e74986cc did not, and the gate's pytest lane
caught it.
This commit is contained in:
@@ -587,8 +587,10 @@ def move_item(
|
|||||||
item.position = _next_item_position(db, dst.id)
|
item.position = _next_item_position(db, dst.id)
|
||||||
db.flush()
|
db.flush()
|
||||||
dst_changed = True
|
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:
|
except IntegrityError:
|
||||||
pass # the savepoint put the row back in the source list; drop it below
|
pass
|
||||||
if not dst_changed:
|
if not dst_changed:
|
||||||
db.delete(item)
|
db.delete(item)
|
||||||
# The source always changed; the target only when the row landed in it. `_touch` on a target
|
# The source always changed; the target only when the row landed in it. `_touch` on a target
|
||||||
|
|||||||
Reference in New Issue
Block a user