Skip to content

Commit

Permalink
Fixed default status parser to use user model from the model factory.…
Browse files Browse the repository at this point in the history
… This enables use of one's own user models.
  • Loading branch information
Pascal Jürgens authored and joshthecoder committed Feb 5, 2011
1 parent 22d10a7 commit fcaff74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tweepy/models.py
Expand Up @@ -47,7 +47,8 @@ def parse(cls, api, json):
status = cls(api)
for k, v in json.items():
if k == 'user':
user = User.parse(api, v)
user_model = getattr(api.parser.model_factory, 'user')
user = user_model.parse(api, v)
setattr(status, 'author', user)
setattr(status, 'user', user) # DEPRECIATED
elif k == 'created_at':
Expand Down

0 comments on commit fcaff74

Please sign in to comment.