Commit 517a0f25 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Merge pull request #351 from tewalds/model_api

Still build a User even if no api is passed in
parents fd7cc6e4 0ffefee3
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment