File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/superannotate/lib/core Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2679,7 +2679,11 @@ def execute(self):
26792679 for step in [step for step in self ._steps if "className" in step ]:
26802680 if step .get ("id" ):
26812681 del step ["id" ]
2682- step ["class_id" ] = annotation_classes_map [step ["className" ]]
2682+ step ["class_id" ] = annotation_classes_map .get (step ["className" ], None )
2683+ if not step ["class_id" ]:
2684+ raise AppException (
2685+ "Annotation class not found in set_project_workflow."
2686+ )
26832687
26842688 self ._service .set_project_workflow_bulk (
26852689 team_id = self ._project .team_id ,
@@ -2699,6 +2703,17 @@ def execute(self):
26992703 attribute_group_name = attribute ["attribute" ]["attribute_group" ][
27002704 "name"
27012705 ]
2706+ if not annotations_classes_attributes_map .get (
2707+ f"{ annotation_class_name } __{ attribute_group_name } __{ attribute_name } " ,
2708+ None ,
2709+ ):
2710+ raise AppException (
2711+ "Attribute group name or attribute name not found in set_project_workflow."
2712+ )
2713+
2714+ if not existing_workflows_map .get (step ["step" ], None ):
2715+ raise AppException ("Couldn't find step in workflow" )
2716+
27022717 req_data .append (
27032718 {
27042719 "workflow_id" : existing_workflows_map [step ["step" ]],
You can’t perform that action at this time.
0 commit comments