3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-05-05 22:25:34 +00:00

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

This commit is contained in:
Daniel Meltzer
2016-05-18 22:29:44 -05:00
parent e42cfc7601
commit 2e5e956810

View File

@ -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()) {