mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Merge pull request #11615 from inietov/fixes/autoincrement_in_importer
Fix auto incrementing in CSV importer [sc-19366]
This commit is contained in:
commit
5f93d7b3be
|
@ -55,6 +55,11 @@ class AssetImporter extends ItemImporter
|
|||
{
|
||||
$editingAsset = false;
|
||||
$asset_tag = $this->findCsvMatch($row, 'asset_tag');
|
||||
|
||||
if(empty($asset_tag)){
|
||||
$asset_tag = Asset::autoincrement_asset();
|
||||
}
|
||||
|
||||
$asset = Asset::where(['asset_tag'=> $asset_tag])->first();
|
||||
if ($asset) {
|
||||
if (! $this->updating) {
|
||||
|
|
Loading…
Reference in a new issue