Skip to content

Commit 61ea47a

Browse files
authored
Update bulk_import_request.py
1 parent a798172 commit 61ea47a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

labelbox/schema/bulk_import_request.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def _validate_ndjson(lines: Iterable[Dict[str, Any]],
343343
uids: Set[str] = set()
344344
for idx, line in enumerate(lines):
345345
try:
346-
annotation = NDAnnotation(**line.copy())
346+
annotation = NDAnnotation(**line)
347347
annotation.validate_instance(data_row_ids, feature_schemas)
348348
uuid = str(annotation.uuid)
349349
if uuid in uids:
@@ -633,13 +633,14 @@ def validate_subclasses(cls, value, field):
633633
#This is caused by the fact that we require these ids for top level classifications but not for subclasses
634634
results = []
635635
for row in value:
636-
row.update({
636+
copied_row = row.copy()
637+
copied_row.update({
637638
'dataRow': {
638639
'id': 'child'.center(25, '_')
639640
},
640641
'uuid': str(uuid4())
641642
})
642-
results.append(row)
643+
results.append(copied_row)
643644
return results
644645

645646

0 commit comments

Comments
 (0)