Skip to content

Commit

Permalink
fix(edit_patch): Remove unnecessary retrieve of resource (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbase12 authored Oct 28, 2024
1 parent 28f8950 commit fb1fd27
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nuvla/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,7 @@ def edit_patch(self, resource_id, data, **kwargs) -> CimiResource:
:return: A CimiResource object
:rtype: CimiResource
"""
resource = self.get(resource_id=resource_id)
return CimiResource(self._cimi_put(resource_id=resource.id, json=data, params=kwargs,
return CimiResource(self._cimi_put(resource_id=resource_id, json=data, params=kwargs,
headers={'content-type': 'application/json-patch+json'}))

def delete(self, resource_id) -> CimiResponse:
Expand Down

0 comments on commit fb1fd27

Please sign in to comment.