diff --git a/Civi/ContactCats/Processor.php b/Civi/ContactCats/Processor.php index a432fcd..c1912dc 100644 --- a/Civi/ContactCats/Processor.php +++ b/Civi/ContactCats/Processor.php @@ -119,7 +119,7 @@ class Processor { $changes = CRM_Core_DAO::executeQuery(<< category_definition_id $singleContactClause + WHERE (category_definition_id IS NULL OR next_category <> category_definition_id) $singleContactClause ORDER BY category_definition_id, next_category SQL); $lastChange = [0, 0];