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, end_to: Optional[int] = None,
process_status: Optional[str] = None, process_status: Optional[str] = None,
user_filter: Optional[bool] = False, user_filter: Optional[bool] = False,
report_identifier: Optional[str] = None report_identifier: Optional[str] = None,
) -> flask.wrappers.Response: ) -> flask.wrappers.Response:
"""Process_instance_list.""" """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: if user_filter:
report_filter = ProcessInstanceReportFilter( report_filter = ProcessInstanceReportFilter(

View File

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