Skip to content

Commit

Permalink
Merge pull request #64 from decide-update-4-1/workbranch-borvercas
Browse files Browse the repository at this point in the history
Workbranch borvercas
  • Loading branch information
borvercas authored Dec 18, 2022
2 parents be01777 + 1784fa4 commit 95fa20d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion decide/voting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ def get_votes(self, token=''):
# gettings votes from store
votes = mods.get('store', params={'voting_id': self.id}, HTTP_AUTHORIZATION='Token ' + token)
# anon votes
return [[i['a'], i['b']] for i in votes]
votes_format = []
vote_list = []
for vote in votes:
for info in vote:
if info == 'a':
votes_format.append(vote[info])
if info == 'b':
votes_format.append(vote[info])
vote_list.append(votes_format)
votes_format = []
return vote_list

def tally_votes(self, token=''):
'''
Expand Down

0 comments on commit 95fa20d

Please sign in to comment.