Get ./bin/pyl to pass

This commit is contained in:
Jon Herron 2022-11-18 14:34:52 -05:00
parent 0230ea914b
commit 859fe5793e
2 changed files with 9 additions and 8 deletions

View File

@ -736,10 +736,12 @@ def process_instance_list(
end_to: Optional[int] = None,
process_status: Optional[str] = None,
user_filter: Optional[bool] = False,
report_identifier: Optional[str] = None
report_identifier: Optional[str] = None,
) -> flask.wrappers.Response:
"""Process_instance_list."""
process_instance_report = ProcessInstanceReportService.report_with_identifier(g.user, report_identifier)
process_instance_report = ProcessInstanceReportService.report_with_identifier(
g.user, report_identifier
)
if user_filter:
report_filter = ProcessInstanceReportFilter(

View File

@ -44,15 +44,14 @@ class ProcessInstanceReportService:
@classmethod
def report_with_identifier(
cls,
user: UserModel,
report_identifier: Optional[str] = None
cls, user: UserModel, report_identifier: Optional[str] = None
) -> ProcessInstanceReportModel:
"""Report_with_filter."""
if report_identifier is None:
return ProcessInstanceReportModel.default_report(user)
# TODO replace with system reports that are loaded on launch (or similar)
temp_system_metdata_map = {
temp_system_metadata_map = {
"system_report_instances_initiated_by_me": {
"columns": [
{"Header": "id", "accessor": "id"},
@ -91,8 +90,8 @@ class ProcessInstanceReportService:
},
}
process_instance_report = cls(
identifier=identifier,
process_instance_report = ProcessInstanceReportModel(
identifier=report_identifier,
created_by_id=user.id,
report_metadata=temp_system_metadata_map[report_identifier],
)