diff --git a/databox/api/src/Validator/ValidRenditionDefinitionConstraintValidator.php b/databox/api/src/Validator/ValidRenditionDefinitionConstraintValidator.php index 6578cccca..0bb44994f 100644 --- a/databox/api/src/Validator/ValidRenditionDefinitionConstraintValidator.php +++ b/databox/api/src/Validator/ValidRenditionDefinitionConstraintValidator.php @@ -24,8 +24,11 @@ public function __construct(private readonly YamlLoader $yamlLoader, private rea */ public function validate($value, Constraint $constraint): void { + if(!($definition = $value->getDefinition())) { + return; + } try { - $config = $this->yamlLoader->parse($value->getDefinition()); + $config = $this->yamlLoader->parse($definition); $this->validator->validate($config); } catch (\Throwable $e) { $this->context