dev/core#2516 Invalidate only smart groups
authorscardinius <scardinius@chords.pl>
Wed, 7 Apr 2021 08:38:51 +0000 (10:38 +0200)
committerscardinius <scardinius@chords.pl>
Wed, 7 Apr 2021 08:38:51 +0000 (10:38 +0200)
CRM/Contact/BAO/GroupContactCache.php

index 3e75e851333f98904533878b740a256337636c67..f8f45dbe83448d8cb4797b7ee323684a04694a02 100644 (file)
@@ -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", [
+      WHERE id = %1 AND saved_search_id IS NOT NULL", [
         1 => [$groupID, 'Positive'],
       ]);
   }