From 3bd27e99960c16c0a9bcab1533b1e6f15b0c9d9e Mon Sep 17 00:00:00 2001 From: ssmith Date: Mon, 22 Jun 2020 13:48:17 -0400 Subject: Small Change to add a useful workflow transaction Change-Id: I635a74605871bfa53337e20635a86632457452df Signed-off-by: Sean Smith --- src/workflow/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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] -- cgit 1.2.3-korg