Skip to content

Commit

Permalink
Convert the Tags dictionary into Tags objects too.
Browse files Browse the repository at this point in the history
  • Loading branch information
akumria committed Feb 28, 2012
1 parent 9132cef commit 9b8d2af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions instagram/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def object_from_dictionary(cls, entry):
new_media.caption = Comment.object_from_dictionary(entry['caption'])

new_media.tags = entry['tags']
if entry['tags']:
new_media.tags = []
for tag in entry['tags']:
new_media.tags.append(Tag.object_from_dictionary({'name': tag}))

new_media.link = entry['link']

Expand Down

0 comments on commit 9b8d2af

Please sign in to comment.