pyl w/ burnettk

This commit is contained in:
jasquat 2023-01-06 15:55:51 -05:00
parent 7f21328b7f
commit acef4bae07
2 changed files with 8 additions and 1 deletions

View File

@ -31,6 +31,9 @@ from spiffworkflow_backend.routes.process_api_blueprint import (
) )
from spiffworkflow_backend.services.git_service import GitService from spiffworkflow_backend.services.git_service import GitService
from spiffworkflow_backend.services.git_service import MissingGitConfigsError from spiffworkflow_backend.services.git_service import MissingGitConfigsError
from spiffworkflow_backend.services.process_instance_report_service import (
ProcessInstanceReportNotFoundError,
)
from spiffworkflow_backend.services.process_instance_report_service import ( from spiffworkflow_backend.services.process_instance_report_service import (
ProcessInstanceReportService, ProcessInstanceReportService,
) )
@ -437,6 +440,10 @@ def process_model_create_with_natural_language(
default_report_metadata = ProcessInstanceReportService.system_metadata_map( default_report_metadata = ProcessInstanceReportService.system_metadata_map(
"default" "default"
) )
if default_report_metadata is None:
raise ProcessInstanceReportNotFoundError(
"Could not find a report with identifier 'default'"
)
for column in columns: for column in columns:
default_report_metadata["columns"].append( default_report_metadata["columns"].append(
{"Header": column, "accessor": column, "filterable": True} {"Header": column, "accessor": column, "filterable": True}

View File

@ -48,7 +48,7 @@ class ProcessInstanceReportFilter:
with_tasks_completed_by_me: Optional[bool] = None with_tasks_completed_by_me: Optional[bool] = None
with_tasks_assigned_to_my_group: Optional[bool] = None with_tasks_assigned_to_my_group: Optional[bool] = None
with_relation_to_me: Optional[bool] = None with_relation_to_me: Optional[bool] = None
process_initiator_username: Optional[str] = (None,) process_initiator_username: Optional[str] = None
def to_dict(self) -> dict[str, str]: def to_dict(self) -> dict[str, str]:
"""To_dict.""" """To_dict."""