From 54f7917fbe12254b832379fe74744b1e1672e8b2 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:21:27 +0000 Subject: [PATCH] Added created by Signed-off-by: snipe --- app/Importer/LocationImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Importer/LocationImporter.php b/app/Importer/LocationImporter.php index b3ef59d248..a9a5152234 100644 --- a/app/Importer/LocationImporter.php +++ b/app/Importer/LocationImporter.php @@ -51,6 +51,7 @@ class LocationImporter extends ItemImporter } else { $this->log('No Matching Location, Create a new one'); $location = new Location; + $location->created_by = auth()->id(); } // Pull the records from the CSV to determine their values @@ -65,7 +66,6 @@ class LocationImporter extends ItemImporter $this->item['ldap_ou'] = trim($this->findCsvMatch($row, 'ldap_ou')); $this->item['manager'] = trim($this->findCsvMatch($row, 'manager')); $this->item['manager_username'] = trim($this->findCsvMatch($row, 'manager_username')); - $this->item['created_by'] = auth()->id(); if ($this->findCsvMatch($row, 'parent_location')) { $this->item['parent_id'] = $this->createOrFetchLocation(trim($this->findCsvMatch($row, 'parent_location')));