Still build a User even if no api is passed in
authorTimo Ewalds <tewalds@google.com>
Thu, 22 Aug 2013 21:17:47 +0000 (17:17 -0400)
committerTimo Ewalds <tewalds@google.com>
Thu, 22 Aug 2013 21:19:30 +0000 (17:19 -0400)
tweepy/models.py

index 0f1024900c2ae87afa773aab178ebeda346564ff..7ccb9b449fdeacddf679681ebbfcaf9098ecae58 100644 (file)
@@ -66,7 +66,7 @@ class Status(Model):
         status = cls(api)
         for k, v in json.items():
             if k == 'user':
-                user_model = getattr(api.parser.model_factory, 'user')
+                user_model = getattr(api.parser.model_factory, 'user') if api else User
                 user = user_model.parse(api, v)
                 setattr(status, 'author', user)
                 setattr(status, 'user', user)  # DEPRECIATED