Commit 0af97f9c by Paul Kastner

re-ordered some code

parent 60939de7
...@@ -51,19 +51,6 @@ class ParseObject(ParseBase): ...@@ -51,19 +51,6 @@ class ParseObject(ParseBase):
if attrs_dict: if attrs_dict:
self._populateFromDict(attrs_dict) self._populateFromDict(attrs_dict)
def _populateFromDict(self, attrs_dict):
self._object_id = attrs_dict['objectId']
self._created_at = self._ISO8601ToDatetime(attrs_dict['createdAt'])
self._updated_at = self._ISO8601ToDatetime(attrs_dict['updatedAt'])
del attrs_dict['objectId']
del attrs_dict['createdAt']
del attrs_dict['updatedAt']
attrs_dict = dict(map(self._convertFromParseType, attrs_dict.items()))
self.__dict__.update(attrs_dict)
def objectId(self): def objectId(self):
return self._object_id return self._object_id
...@@ -89,6 +76,19 @@ class ParseObject(ParseBase): ...@@ -89,6 +76,19 @@ class ParseObject(ParseBase):
self = self.__init__(None) self = self.__init__(None)
def _populateFromDict(self, attrs_dict):
self._object_id = attrs_dict['objectId']
self._created_at = self._ISO8601ToDatetime(attrs_dict['createdAt'])
self._updated_at = self._ISO8601ToDatetime(attrs_dict['updatedAt'])
del attrs_dict['objectId']
del attrs_dict['createdAt']
del attrs_dict['updatedAt']
attrs_dict = dict(map(self._convertFromParseType, attrs_dict.items()))
self.__dict__.update(attrs_dict)
def _convertToParseType(self, prop): def _convertToParseType(self, prop):
key, value = prop key, value = prop
......
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