Skip to content

Commit

Permalink
EZP-31459: [UDW] Allowed Content Types are not respected in object re…
Browse files Browse the repository at this point in the history
…lation field (#1307)
  • Loading branch information
konradoboza authored Apr 14, 2020
1 parent 916c2d7 commit c15df5d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function onUdwConfigResolve(ConfigResolveEvent $event): void
}

if (
!isset($context['type'], $context['allowed_content_types'], $config['allowed_content_types'])
!isset($context['type'], $context['allowed_content_types'])
|| 'object_relation' !== $context['type']
) {
return;
Expand All @@ -54,7 +54,9 @@ public function onUdwConfigResolve(ConfigResolveEvent $event): void
? null
: $intersection;
} else {
$config['allowed_content_types'] = $context['allowed_content_types'];
$config['allowed_content_types'] = empty($context['allowed_content_types'])
? null
: $context['allowed_content_types'];
}

$event->setConfig($config);
Expand Down

0 comments on commit c15df5d

Please # to comment.