🗃️(backend) make document/template creation atomic

When creating a new document/template via the API, we add the
logged-in user as owner of the created object. This should be
done atomically with the object creation to make sure we don't
end-up with an orphan object that the creator can't access
anymore.
This commit is contained in:
Samuel Paccoud - DINUM
2025-01-27 21:20:16 +01:00
committed by Anthony LC
parent 5042f4ca47
commit 5c5763a0ef
2 changed files with 3 additions and 9 deletions

View File

@@ -85,6 +85,7 @@ def test_api_documents_trashbin_format():
"media_auth": True,
"move": False, # Can't move a deleted document
"partial_update": True,
"restore": True,
"retrieve": True,
"update": True,
"versions_destroy": True,