Validate info provider references modified via part edit form

This commit is contained in:
Jan Böhmer 2026-06-28 23:56:55 +02:00
parent e03eda84c5
commit ffcfdb793f
4 changed files with 58 additions and 1 deletions

View file

@ -100,6 +100,13 @@ class InfoProviderReferenceType extends AbstractType implements DataMapperInterf
}
$oldDate = $viewData->getLastUpdated();
//If all fields are empty, we set the view data to a new instance without provider information
if ($providerKey === null && $providerId === null && $providerUrl === null) {
$viewData = InfoProviderReference::noProvider();
return;
}
$viewData = InfoProviderReference::create($providerKey, $providerId, $providerUrl, $oldDate);
}