Skip to content

Commit 92fdecd

Browse files
committed
Rolling back to test on "projectCount" + comment.
1 parent 6cababb commit 92fdecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dataikuapi/dss/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ def delete(self, force=False):
144144
}
145145
ret = self.client._perform_json("POST", "/plugins/{pluginId}/actions/delete".format(pluginId=self.plugin_id),
146146
body=params)
147-
if "state" not in ret:
147+
# we check for the presence of a field of the aggregated usage statistics structure returned
148+
# when the plugin exist and has usages
149+
if "projectCount" in ret:
148150
raise DataikuException("Plugin has usages or analysis errors. See list_usages() for more info.")
149151
return self.client.get_future(ret.get("jobId", None))
150152

0 commit comments

Comments
 (0)