From f9a7b3cb7197675f1c3ad1aeb5b7a35f123c7c0e Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 20 Mar 2023 17:47:52 -0400 Subject: [PATCH] checking for "falsy" lists in python will return false if the list is empty -- but we want to clear out the columns and filters if they are empty lists. --- .../services/process_instance_report_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py index 3de0319ec..0f62a7381 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py @@ -455,9 +455,9 @@ class ProcessInstanceReportService: instance_metadata_aliases = {} stock_columns = ProcessInstanceReportService.get_column_names_for_model(ProcessInstanceModel) - if report_filter.report_column_list: + if isinstance(report_filter.report_column_list, list): process_instance_report.report_metadata["columns"] = report_filter.report_column_list - if report_filter.report_filter_by_list: + if isinstance(report_filter.report_filter_by_list, list): process_instance_report.report_metadata["filter_by"] = report_filter.report_filter_by_list for column in process_instance_report.report_metadata["columns"]: