Skip to content

Commit

Permalink
Adjusted the data sent to _fill_fields via the fetch function.
Browse files Browse the repository at this point in the history
Due to inconsistencies in the GAPI with regards to nested resources, we must use
`_raw_data` when populating a resource via the `fetch` function
  • Loading branch information
bartek committed Mar 23, 2015
1 parent a7b666e commit d007cc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
-------

0.1.38 (2015-03-23)
-------------------

* Fixed: Due to inconsistencies in the G API with regards to nested resources, the `fetch` function was modified to use the raw data from the API, rather than a specific set of allowed fields.

0.1.37 (2015-03-23)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion gapipy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

__version__ = '0.1.37'
__version__ = '0.1.38'
__title__ = 'gapipy'


Expand Down
2 changes: 1 addition & 1 deletion gapipy/resources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def fetch(self):
# Fetch the resource using the client bound on it, which handles cache get/set.
resource_obj = getattr(self._client, self._resource_name).get(self.id)
if resource_obj:
self._fill_fields(resource_obj.to_dict())
self._fill_fields(resource_obj._raw_data)

return self

Expand Down

0 comments on commit d007cc5

Please sign in to comment.