File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 4343
4444_LABELBOX_API_KEY = "LABELBOX_API_KEY"
4545
46+ class DeleteFeatureFromOntologyResult :
47+ archived : bool
48+ deleted : bool
4649
4750class Client :
4851 """ A Labelbox client.
@@ -1597,10 +1600,6 @@ def get_model_slice(self, slice_id) -> ModelSlice:
15971600 res = self .execute (query_str , {"id" : slice_id })
15981601 return Entity .ModelSlice (self , res ["getSavedQuery" ])
15991602
1600- class DeleteFeatureFromOntologyResult :
1601- archived : bool
1602- deleted : bool
1603-
16041603 def delete_feature_schema_from_ontology (
16051604 self , ontology_id : str ,
16061605 feature_schema_id : str ) -> DeleteFeatureFromOntologyResult :
@@ -1637,7 +1636,10 @@ def delete_feature_schema_from_ontology(
16371636 elif response_json ['deleted' ] == True :
16381637 logger .info (
16391638 'Feature schema was successfully removed from the ontology' )
1640- return response_json
1639+ result = DeleteFeatureFromOntologyResult ()
1640+ result .archived = bool (response_json ['archived' ])
1641+ result .deleted = bool (response_json ['deleted' ])
1642+ return result
16411643 else :
16421644 raise labelbox .exceptions .LabelboxError (
16431645 "Failed to remove feature schema from ontology, message: " +
You can’t perform that action at this time.
0 commit comments