fix: scope transactional locks to primary records
This commit is contained in:
@@ -257,7 +257,7 @@ def sync_ticket_intake_failure_work_item(
|
||||
actor=None,
|
||||
) -> WorkItem | None:
|
||||
draft = (
|
||||
TicketDraft.objects.select_for_update()
|
||||
TicketDraft.objects.select_for_update(of=("self",))
|
||||
.select_related("created_by", "latest_agent_run")
|
||||
.get(id=draft.id)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user