Skip to content

Commit 882c08a

Browse files
handle None
1 parent 78fbdd4 commit 882c08a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

label_studio/io_storages/base_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,15 @@ def add_task(cls, project, maximum_annotations, max_inner_id, storage, link_para
347347
data = link_kwargs.pop('task_data')
348348

349349
# predictions
350-
predictions = data.get('predictions', [])
350+
predictions = data.get('predictions') or []
351351
if predictions:
352352
if 'data' not in data:
353353
raise ValueError(
354354
'If you use "predictions" field in the task, ' 'you must put "data" field in the task too'
355355
)
356356

357357
# annotations
358-
annotations = data.get('annotations', [])
358+
annotations = data.get('annotations') or []
359359
cancelled_annotations = 0
360360
if annotations:
361361
if 'data' not in data:

0 commit comments

Comments
 (0)