Commit 0ffefee3 authored by Timo Ewalds's avatar Timo Ewalds
Browse files

Still build a User even if no api is passed in

parent fd7cc6e4
......@@ -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