Skip to content

Commit 571e860

Browse files
committed
Revert "Handle invalid enum update properly"
This reverts commit d6fcb87.
1 parent d6fcb87 commit 571e860

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

labelbox/schema/data_row_metadata.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def _parse_ontology(raw_ontology) -> List[DataRowMetadataSchema]:
255255
options = []
256256
for option in schema["options"]:
257257
option["uid"] = option["id"]
258+
258259
options.append(
259260
DataRowMetadataSchema(**{
260261
**option,
@@ -365,12 +366,7 @@ def update_enum_option(self, name: str, option: str,
365366
raise ValueError(
366367
f"Updating Enum option is only supported for Enum metadata schema"
367368
)
368-
valid_options: List[str] = [o.name for o in schema.options]
369369

370-
if option not in valid_options:
371-
raise ValueError(
372-
f"Enum option '{option}' is not a valid option for Enum '{name}', valid options are: {valid_options}"
373-
)
374370
upsert_schema = _UpsertCustomMetadataSchemaInput(id=schema.uid,
375371
name=schema.name,
376372
kind=schema.kind.value)

0 commit comments

Comments
 (0)