Skip to content

Commit

Permalink
Fix booth voting with big keys
Browse files Browse the repository at this point in the history
  • Loading branch information
danigm committed Apr 8, 2019
1 parent 1f93d7d commit 2b873b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions decide/booth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ def get_context_data(self, **kwargs):

try:
r = mods.get('voting', params={'id': vid})

# Casting numbers to string to manage in javascript with BigInt
# and avoid problems with js and big number conversion
for k, v in r[0]['pub_key'].items():
r[0]['pub_key'][k] = str(v)

context['voting'] = json.dumps(r[0])
except:
raise Http404
Expand Down

0 comments on commit 2b873b4

Please sign in to comment.