refactor(prospecting): migrate SVC-006 transaction control to endpoint level
Some checks failed
CI / validate (push) Has been cancelled
CI / ruff (push) Successful in 10s
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has started running

Move db.commit() from services to API endpoints and Celery tasks.
Services now use db.flush() only; endpoints own the transaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 16:40:09 +01:00
parent 78ee05f50e
commit 22ae63b414
12 changed files with 52 additions and 24 deletions

View File

@@ -51,6 +51,7 @@ def create_interaction(
user_id=current_admin.user_id,
data=data.model_dump(exclude_none=True),
)
db.commit()
return InteractionResponse.model_validate(interaction)