From ed89d69d0bd1c6f4269a62c334e04b59514bd9be Mon Sep 17 00:00:00 2001 From: Dan Krause Date: Sat, 8 Nov 2014 00:11:28 -0600 Subject: [PATCH] fix mistake in File constuctor (missing url) --- parse_rest/datatypes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parse_rest/datatypes.py b/parse_rest/datatypes.py index 9026611..5d1b84f 100644 --- a/parse_rest/datatypes.py +++ b/parse_rest/datatypes.py @@ -193,10 +193,8 @@ def from_native(cls, **kw): return cls(**kw) def __init__(self, name, content=None, mimetype=None, url=None): - if isinstance(name, dict): - name = name["name"] self._name = name - self._file_url = None + self._file_url = url self._api_url = '/'.join([API_ROOT, 'files', name]) self._content = content self._mimetype = mimetype or mimetypes.guess_type(name)