Skip to content

Commit

Permalink
Merge pull request #14 from essexcountycouncil/fix/LP-90-query
Browse files Browse the repository at this point in the history
fix(LP-90): Remove check that field_content_owner_exists
  • Loading branch information
Polynya authored Sep 25, 2024
2 parents 315aecf + 018ff91 commit b645c63
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Commands/ContentOwnership.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,10 @@ public function addServiceContactsToNodes() {

$node_storage = $this->entityTypeManager->getStorage('node');
$ids = $node_storage->getQuery()
->exists('field_content_owner')
->accessCheck(FALSE)
->execute();
/** @var \Drupal\node\NodeInterface $node */
foreach ($node_storage->loadMultiple($ids) as $node) {
if (!$node->hasField('field_content_owner')) {
continue;
}

$content_owners = [];
// Combine content owners of both types without duplication.
foreach ($node->get('field_content_owner')->referencedEntities() as $entity) {
Expand Down

0 comments on commit b645c63

Please sign in to comment.