mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-07-29 20:51:47 +00:00
Validate info provider references modified via part edit form
This commit is contained in:
parent
e03eda84c5
commit
ffcfdb793f
4 changed files with 58 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue