Skip to content

Commit

Permalink
return directly object from fetch instead of dict because crd objects…
Browse files Browse the repository at this point in the history
… have many more attributes than just dict with data
  • Loading branch information
mkudlej committed Feb 11, 2022
1 parent 33a152e commit db09d7a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions threescale_api/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def fetch(self, entity_id: int = None, **kwargs) -> dict:
Returns(dict): Resource dict from the 3scale
"""
log.debug(self._log_message("[FETCH] Fetch ", entity_id=entity_id, args=kwargs))
print(self._log_message("[FETCH] Fetch ", entity_id=entity_id, args=kwargs))
url = self._entity_url(entity_id=entity_id)
response = self.rest.get(url=url, **kwargs)
return utils.extract_response(response=response, entity=self._entity_name)
Expand Down Expand Up @@ -231,7 +230,6 @@ def _list(self, **kwargs) -> List['DefaultResource']:
return instance

def _entity_url(self, entity_id=None) -> str:
print(str(self.url), str(entity_id), str(self.threescale_client.admin_api_url))
if not entity_id:
return self.url
return self.url + '/' + str(entity_id)
Expand Down

0 comments on commit db09d7a

Please sign in to comment.