From df749f26f5ae308767d719838156062ca18231f6 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Wed, 18 May 2016 22:29:44 -0500 Subject: [PATCH] Add the company/suppliers to the cache. This fixes some issues with duplicate items existing --- app/Console/Commands/ObjectImportCommand.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Console/Commands/ObjectImportCommand.php b/app/Console/Commands/ObjectImportCommand.php index 96c3c62e5d..8d41ee0bcc 100644 --- a/app/Console/Commands/ObjectImportCommand.php +++ b/app/Console/Commands/ObjectImportCommand.php @@ -275,6 +275,7 @@ class ObjectImportCommand extends Command { $company = new Company(); $company->name = $asset_company_name; + $this->companies->add($company); if(!$this->option('testrun')) { if ($company->save()) { @@ -406,6 +407,7 @@ class ObjectImportCommand extends Command { $supplier = new Supplier(); $supplier->name = $supplier_name; $supplier->user_id = 1; + $this->suppliers->add($supplier); if(!$this->option('testrun')) { if ($supplier->save()) {