Fix python doc strings

This commit is contained in:
mike cullerton 2022-06-14 09:44:36 -04:00
parent 17d1a6dcbb
commit 8831f122eb
3 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,8 @@ class ProcessModelService(FileSystemService):
def process_model_delete(self, process_model_id: str):
"""Delete Procecss Model."""
instances = ProcessInstanceModel.query.filter(ProcessInstanceModel.process_model_identifier == process_model_id).all()
instances = ProcessInstanceModel.query.filter(
ProcessInstanceModel.process_model_identifier == process_model_id).all()
if len(instances) > 0:
raise ApiError(code='existing_instances',
message=f'We cannot delete the model `{process_model_id}`, there are existing instances that depend on it.')

View File

@ -75,6 +75,7 @@ def test_process_model_delete(
def test_process_model_delete_with_instances(
app: Flask, client: FlaskClient, with_bpmn_file_cleanup: None
):
"""Test_process_model_delete_with_instances."""
db.session.query(ProcessInstanceModel).delete()
db.session.commit()

View File

@ -1,4 +1,4 @@
"""test_file."""
"""Test_file."""
from spiffworkflow_backend.models.file import File