From 38b0ad12b043f43ff41cc8d70a649801307d34df Mon Sep 17 00:00:00 2001 From: scardinius Date: Wed, 14 Apr 2021 10:15:03 +0200 Subject: [PATCH] dev/core#2516 Invalidate only smart groups - is smart group or has children --- CRM/Contact/BAO/GroupContactCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index f8f45dbe83..876b6dfd68 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -578,7 +578,7 @@ ORDER BY gc.contact_id, g.children public static function invalidateGroupContactCache($groupID) { CRM_Core_DAO::executeQuery("UPDATE civicrm_group SET cache_date = NULL - WHERE id = %1 AND saved_search_id IS NOT NULL", [ + WHERE id = %1 AND (saved_search_id IS NOT NULL OR children IS NOT NULL)", [ 1 => [$groupID, 'Positive'], ]); } -- 2.25.1