Skip to content

Commit 668b01d

Browse files
author
Val Brodsky
committed
Remove uuid from validation of RasterData because it does not exist as an attribute
1 parent f4b1f1f commit 668b01d

File tree

2 files changed

+1
-3
lines changed
  • libs/labelbox/src/labelbox/data

2 files changed

+1
-3
lines changed

libs/labelbox/src/labelbox/data/annotation_types/data/raster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def create_url(self, signer: Callable[[bytes], str]) -> str:
157157

158158
@model_validator(mode='after')
159159
def validate_args(self):
160-
if self.uid == self.file_path == self.im_bytes == self.url == self.global_key == None and self.arr is None:
160+
if self.file_path == self.im_bytes == self.url == self.global_key == None and self.arr is None:
161161
raise ValueError(
162162
"One of `file_path`, `im_bytes`, `url`, `uid`, `global_key` or `arr` required."
163163
)

libs/labelbox/src/labelbox/data/serialization/ndjson/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ class NDAnnotation(NDJsonBase):
5151
def must_set_one(self):
5252
if self.schema_id is None and self.name is None:
5353
raise ValueError("Schema id or name are not set. Set either one.")
54-
if self.schema_id is not None and self.name is not None:
55-
raise ValueError("Schema id and name are both set. Set only one.")
5654
return self
5755

5856
def dict(self, *args, **kwargs):

0 commit comments

Comments
 (0)