diff --git a/src/spiffworkflow_backend/routes/process_api_blueprint.py b/src/spiffworkflow_backend/routes/process_api_blueprint.py index 664e44c0..39373cd4 100644 --- a/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -296,11 +296,6 @@ def add_file(process_group_id: str, process_model_id: str) -> flask.wrappers.Res file.file_contents = file_contents file.process_model_id = process_model.id file.process_group_id = process_model.process_group_id - if not process_model.primary_process_id and file.type == FileType.bpmn.value: - SpecFileService.process_bpmn_file( - process_model, file.name, set_primary_file=True - ) - process_model_service.save_process_model(process_model) return Response( json.dumps(FileSchema().dump(file)), status=201, mimetype="application/json" ) diff --git a/src/spiffworkflow_backend/services/spec_file_service.py b/src/spiffworkflow_backend/services/spec_file_service.py index 83a81244..89a6effe 100644 --- a/src/spiffworkflow_backend/services/spec_file_service.py +++ b/src/spiffworkflow_backend/services/spec_file_service.py @@ -74,7 +74,7 @@ class SpecFileService(FileSystemService): SpecFileService.write_file_data_to_system(file_path, binary_data) file = SpecFileService.to_file_object(file_name, file_path) - if file.type == str(FileType.bpmn): + if file.type == FileType.bpmn.value: set_primary_file = False if ( process_model_info.primary_file_name is None