diff --git a/helios/models.py b/helios/models.py index 695494f1fa5c465d1d8604d77f35eb21f09e9577..80d12ba507bdde339bccbb0abf9eb96750d8b666 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 36e36200db8abfd8e0004126b44b93fb5190e558..f218a1a200583b759a5612f1adb80ff520557d49 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