Don't explicitly raise a TroveboxError if False is returned,
rely on frontend to issue an error code. This also means we don't need to test for this in unit tests.
This commit is contained in:
parent
6b3f010920
commit
bf437ffc7e
10 changed files with 20 additions and 133 deletions
|
@ -39,12 +39,9 @@ class ApiAction(ApiBase):
|
|||
Returns True if successful.
|
||||
Raises a TroveboxError if not.
|
||||
"""
|
||||
result = self._client.post("/action/%s/delete.json" %
|
||||
self._extract_id(action),
|
||||
**kwds)["result"]
|
||||
if not result:
|
||||
raise TroveboxError("Delete response returned False")
|
||||
return result
|
||||
return self._client.post("/action/%s/delete.json" %
|
||||
self._extract_id(action),
|
||||
**kwds)["result"]
|
||||
|
||||
def view(self, action, **kwds):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue