Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix AttributeCollector fails when no group is selected
Ioannis committed Mar 18, 2025
1 parent 4a5a11b commit a97265f
Showing 1 changed file with 4 additions and 3 deletions.
@@ -232,9 +232,10 @@ public function hydrate(int $id, \App\Model\Entity\Petition $petition): bool
return in_array($attr['enrollment_attribute']['attribute'], $groupAttributes);
})->toArray();

$groupMemberObj = TableRegistry::getTableLocator()->get('GroupMembers');
$groupMemberObj->saveAttributeCollectorPetitionAttributes($person->id, $fieldsForGroup);

if (!empty($fieldsForGroup)) {
$groupMemberObj = TableRegistry::getTableLocator()->get('GroupMembers');
$groupMemberObj->saveAttributeCollectorPetitionAttributes($person->id, $fieldsForGroup);
}
// Save the Date Of Birth. This is the only one that is single valued
// and goes under the Person

0 comments on commit a97265f

Please sign in to comment.