From: ssmith Date: Mon, 22 Jun 2020 17:48:17 +0000 (-0400) Subject: Small Change to add a useful workflow transaction X-Git-Tag: 2.0.99~30 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F70%2F70370%2F1;p=laas.git Small Change to add a useful workflow transaction Change-Id: I635a74605871bfa53337e20635a86632457452df Signed-off-by: Sean Smith --- diff --git a/src/workflow/models.py b/src/workflow/models.py index 4a5616e..f550a38 100644 --- a/src/workflow/models.py +++ b/src/workflow/models.py @@ -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]