Skip to content

Commit 27b6720

Browse files
committed
fixed bug in run_training disabling
1 parent d32cb8d commit 27b6720

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

superannotate/ml/ml_funcs.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,15 @@ def run_training(
228228
raise SABaseException(0, "Invalid project types")
229229
project_type = types.pop()
230230

231-
upload_state = upload_state_int_to_str(project.get("upload_state"))
232-
if upload_state == "External":
233-
raise SABaseException(
234-
0,
235-
"The function does not support projects containing images attached with URLs"
231+
for single_project in project:
232+
upload_state = upload_state_int_to_str(
233+
single_project.get("upload_state")
236234
)
235+
if upload_state == "External":
236+
raise SABaseException(
237+
0,
238+
"The function does not support projects containing images attached with URLs"
239+
)
237240

238241
base_model = base_model.get(project_type, None)
239242
if not base_model:

0 commit comments

Comments
 (0)