Skip to content
Snippets Groups Projects
Commit 5c49182a authored by Ben Adida's avatar Ben Adida
Browse files

more error resilient for voter_id encoding

parent fac81fef
Branches
No related tags found
No related merge requests found
...@@ -827,7 +827,10 @@ class Voter(HeliosModel): ...@@ -827,7 +827,10 @@ class Voter(HeliosModel):
try: try:
return utils.hash_b64(value_to_hash) return utils.hash_b64(value_to_hash)
except: except:
try:
return utils.hash_b64(value_to_hash.encode('latin-1')) return utils.hash_b64(value_to_hash.encode('latin-1'))
except:
return utils.hash_b64(value_to_hash.encode('utf-8'))
@property @property
def voter_type(self): def voter_type(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment