mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Add the company/suppliers to the cache. This fixes some issues with duplicate items existing
This commit is contained in:
parent
191ae110d0
commit
df749f26f5
|
@ -275,6 +275,7 @@ class ObjectImportCommand extends Command {
|
||||||
|
|
||||||
$company = new Company();
|
$company = new Company();
|
||||||
$company->name = $asset_company_name;
|
$company->name = $asset_company_name;
|
||||||
|
$this->companies->add($company);
|
||||||
|
|
||||||
if(!$this->option('testrun')) {
|
if(!$this->option('testrun')) {
|
||||||
if ($company->save()) {
|
if ($company->save()) {
|
||||||
|
@ -406,6 +407,7 @@ class ObjectImportCommand extends Command {
|
||||||
$supplier = new Supplier();
|
$supplier = new Supplier();
|
||||||
$supplier->name = $supplier_name;
|
$supplier->name = $supplier_name;
|
||||||
$supplier->user_id = 1;
|
$supplier->user_id = 1;
|
||||||
|
$this->suppliers->add($supplier);
|
||||||
|
|
||||||
if(!$this->option('testrun')) {
|
if(!$this->option('testrun')) {
|
||||||
if ($supplier->save()) {
|
if ($supplier->save()) {
|
||||||
|
|
Loading…
Reference in a new issue