Better error messaging for bad fields

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-11-13 16:44:09 +00:00
parent 74ca561ab0
commit 2f943bc052

View file

@ -109,7 +109,7 @@ class AssetModelImporter extends ItemImporter
} else {
$this->log($assetmodel->getErrors()->first());
$this->addErrorToBag($assetmodel, '', $assetmodel->getErrors()->first());
$this->addErrorToBag($assetmodel, $assetmodel->getErrors()->keys()[0], $assetmodel->getErrors()->first());
return $assetmodel->getErrors();
}