PUT not PATCH

master
Marek Isalski 2 years ago
parent 5d57f34148
commit af766574a7

@ -126,9 +126,6 @@ class API(object):
def post(self, uri, data=None, params=None):
return self._request(uri, method="POST", data=data, params=params)
def patch(self, uri, data=None, params=None):
return self._request(uri, method="PATCH", data=data, params=params)
def put(self, uri, data=None, params=None):
return self._request(uri, method="PUT", data=data, params=params)
@ -182,7 +179,7 @@ class APIObject(object):
raise ValueError("%s not yet created" % (self.__class__.__name__,))
if not self._data:
raise ValueError("No data associated with record.")
self._data = self._api.patch(self.makeUrl(), data=self._data)
self._data = self._api.put(self.makeUrl(), data=self._data)
self.id = int( self._data.get("id") )
return self._data

Loading…
Cancel
Save