Skip to content

Commit d050e74

Browse files
fix(v2): raise NotFoundError on soft_delete of already-deleted entity
Use execute_for_one instead of execute so soft_delete returns 404 when the entity is already soft-deleted, matching v1 behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5d54af3 commit d050e74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/notora/v2/services/mixins/delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def soft_delete(
4040
actor_id: Any | None = None,
4141
) -> None:
4242
additional_payload = self._apply_updated_by({}, actor_id) or None
43-
await self.execute(
43+
await self.execute_for_one(
4444
session,
4545
self.repo.soft_delete(pk, additional_payload=additional_payload),
4646
)

0 commit comments

Comments
 (0)