Check that the ID has a value

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-01-20 16:38:31 +00:00
parent 801328ec42
commit 48a916ab77

View file

@ -39,7 +39,7 @@ class LocationImporter extends ItemImporter
$editingLocation = false;
if ($this->findCsvMatch($row, 'id')) {
if ($this->findCsvMatch($row, 'id')!='') {
$location = Location::find($this->findCsvMatch($row, 'id'));
} else {
$location = Location::where('name', '=', $this->findCsvMatch($row, 'name'))->first();