Skip to content

Commit

Permalink
Manual fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
puresyntax71 committed Jan 10, 2025
1 parent 99c6571 commit ea05b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/CiviEntityStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ protected function initFieldValues(ContentEntityInterface $entity, array $values

// Handle special cases for field definitions.
foreach ($field_definitions as $definition) {
if (($field_metadata = $definition->getSetting('civicrm_entity_field_metadata')) && isset($field_metadata['custom_group_id']) && in_array($field_metadata['data_type'], ['Float', 'Money'])) {
$data_types = ['Float', 'Money'];
if (($field_metadata = $definition->getSetting('civicrm_entity_field_metadata')) && isset($field_metadata['custom_group_id']) && in_array($field_metadata['data_type'], $data_types)) {
$items = $entity->get($definition->getName());
$item_values = $items->getValue();
if (!empty($item_values)) {
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Sql/CivicrmEntityStorageSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function requiresFieldStorageSchemaChanges(FieldStorageDefinitionInterfac
* {@inheritdoc}
*/
public function onFieldableEntityTypeCreate(EntityTypeInterface $entity_type, array $field_storage_definitions) {
return;
}

}

0 comments on commit ea05b40

Please sign in to comment.