fix: veralteten stand vor weiteren prüfungen als konflikt melden
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ff2860f7be
commit
9ba4655662
2 files changed
+16
No files matched your search
@@ -125,6 +125,9 @@ def update_clip(
|
||||
expected_version: int | None = None,
|
||||
) -> Clip:
|
||||
"""Apply a partial update. With expected_version, a concurrent change raises ClipConflict."""
|
||||
# Early check so a stale client gets the conflict, not a follow-up validation error
|
||||
if expected_version is not None and clip.version != expected_version:
|
||||
raise ClipConflict(clip)
|
||||
kind = changes.get("kind", clip.kind)
|
||||
title = changes.get("title", clip.title)
|
||||
content = changes.get("content", clip.content)
|
||||
|
||||
Reference in new issue
Block a user