Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
add answer image url to poll serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
MelizzaP committed Mar 15, 2016
1 parent c5f696d commit 285d988
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bulbs/poll/serializers.py
Expand Up @@ -40,6 +40,8 @@ def to_representation(self, poll):
sodahead_answer = sodahead_data['poll']['answers'][sodahead_index]
representation['answers'][index]['sodahead_id'] = sodahead_answer['id']
representation['answers'][index]['total_votes'] = sodahead_answer['totalVotes']
if answer.answer_image:
representation['answers'][index]['answer_image_url'] = answer.answer_image.get_crop_url(ratio='1x1')
index += 1

return representation

0 comments on commit 285d988

Please sign in to comment.