diff --git a/representatives_votes/models.py b/representatives_votes/models.py index d26c0af558eb68825b9677b8f211ce95b49aaf70..c8da255eb8846f50c048fb2bd137fed89f8dc2e3 100644 --- a/representatives_votes/models.py +++ b/representatives_votes/models.py @@ -23,9 +23,10 @@ class Proposal(models.Model): # Presentation for the api def vote_api_list(self): - return [ - {'position': vote.position, - 'representative': vote.representative_remote_id} + return [{'position': vote.position, + 'representative_remote_id': vote.representative_remote_id, + 'representative_name': vote.representative_name + } for vote in self.vote_set.all()]