Small Change to add a useful workflow transaction 70/70370/1
authorssmith <ssmith@iol.unh.edu>
Mon, 22 Jun 2020 17:48:17 +0000 (13:48 -0400)
committerssmith <ssmith@iol.unh.edu>
Mon, 22 Jun 2020 17:49:03 +0000 (13:49 -0400)
Change-Id: I635a74605871bfa53337e20635a86632457452df
Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
src/workflow/models.py

index 4a5616e..f550a38 100644 (file)
@@ -11,6 +11,7 @@
 from django.template.loader import get_template
 from django.http import HttpResponse
 from django.utils import timezone
+from django.db import transaction
 
 import yaml
 import requests
@@ -559,6 +560,7 @@ class Repository():
         self.el[self.RESULT] = bundle
         return False
 
+    @transaction.atomic  # TODO: Rewrite transactions with savepoints at user level for all workflows
     def make_booking(self):
         models = self.el[self.BOOKING_MODELS]
         owner = self.el[self.SESSION_USER]