From 99e1c17935af0275d7509fa52256a394848ed47b Mon Sep 17 00:00:00 2001
From: Liz Fong-Jones <lizf@honeycomb.io>
Date: Fri, 17 Sep 2021 12:10:06 -0700
Subject: [PATCH] fix obvious errors

---
 helios/models.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helios/models.py b/helios/models.py
index e560ccb..368438e 100644
--- a/helios/models.py
+++ b/helios/models.py
@@ -799,8 +799,8 @@ class VoterFile(models.Model):
       # create the voter
       if not existing_voter:
           if voter['voter_type'] != 'password':
-              user = User.update_or_create(user_type=voter['voter_type'], user_id=voter['voter_id'])
-              Voter.register_user_in_election(user, election)
+              user, _ = User.objects.get_or_create(user_type=voter['voter_type'], user_id=voter['voter_id'], defaults = {'name': voter['voter_id'], 'info': {}, 'token': None})
+              Voter.register_user_in_election(user, self.election)
           else:
               voter_uuid = str(uuid.uuid4())
               new_voter = Voter(uuid=voter_uuid, user = None, voter_login_id = voter['voter_id'],
-- 
GitLab