From 81a9db62a1a0cecf00fd01da715fc307eec73139 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Fri, 26 Jan 2024 12:15:40 -0500 Subject: [PATCH] the field needs null --- CRM/Report/BAO/ReportInstance.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Report/BAO/ReportInstance.php b/CRM/Report/BAO/ReportInstance.php index ddbfe9fd16..260f378620 100644 --- a/CRM/Report/BAO/ReportInstance.php +++ b/CRM/Report/BAO/ReportInstance.php @@ -29,6 +29,11 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance implem return NULL; } + if (empty($params['grouprole'])) { + // an empty array is getting stored as '' but it needs to be null + $params['grouprole'] = NULL; + } + if (!isset($params['id'])) { $params['domain_id'] ??= CRM_Core_Config::domainID(); // CRM-17256 set created_id on report creation. -- 2.25.1