Skip to content

A free open source IT asset/license management system

Add the company/suppliers to the cache. This fixes some issues with duplicate items existing

Daniel Meltzer2e5e95681086
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()) {