From d5a3c173a6d8174adf28cfd480d0468ec54c090c Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Tue, 8 Sep 2015 00:33:04 +0000 Subject: [PATCH] updated transaction decorators for 1.7 deprecation --- helios/models.py | 2 +- helios/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helios/models.py b/helios/models.py index 695494f..80d12ba 100644 --- a/helios/models.py +++ b/helios/models.py @@ -805,7 +805,7 @@ class Voter(HeliosModel): self.user = User(user_type='password', user_id=self.voter_email, name=self.voter_name) @classmethod - @transaction.commit_on_success + @transaction.atomic def register_user_in_election(cls, user, election): voter_uuid = str(uuid.uuid4()) voter = Voter(uuid= voter_uuid, user = user, election = election) diff --git a/helios/views.py b/helios/views.py index 36e3620..f218a1a 100644 --- a/helios/views.py +++ b/helios/views.py @@ -970,7 +970,7 @@ def one_election_save_questions(request, election): # always a machine API return SUCCESS -@transaction.commit_on_success +@transaction.atomic @election_admin(frozen=False) def one_election_freeze(request, election): # figure out the number of questions and trustees -- GitLab