mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 13:14:07 -08:00
Add autoincrementing asset tags to the import if the CSV column is empty
This commit is contained in:
parent
b52c00d49b
commit
9f0ecba9b9
|
@ -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