Skip to content

Commit

Permalink
Merge pull request facebookarchive#21 from akumria/fixup-add-tags-to-…
Browse files Browse the repository at this point in the history
…media

Convert the Tags dictionary into Tags objects too.
  • Loading branch information
Mike Krieger committed Feb 28, 2012
2 parents 9132cef + 9b8d2af commit 2c5f308
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 2c5f308

Please sign in to comment.