Problem/Motivation

Not really a bug, but GroupRelationshipStorage::createForEntityInGroup() has:

    // If the entity is config, we need to use the wrapper for it.
    if ($group_relation_type->handlesConfigEntityType()) {
      $storage = $this->entityTypeManager->getStorage('group_config_wrapper');
      assert($storage instanceof ConfigWrapperStorageInterface);
      $entity = $storage->wrapEntity($entity);
    }

However, when we further down create the GroupRelationship and assign the target entity, it will always get wrapped regardless because of RelationshipEntityReferenceItem::setValue(). So let's remove the extra call to wrapEntity() and make the storage code easier to read.

Data model changes

Issue fork group-3587087

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kristiaanvandeneynde created an issue. See original summary.

kristiaanvandeneynde’s picture

Status: Active » Needs review

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.