Fix NRE when item has no category ladders (#715)
This commit is contained in:
parent
f175b7592e
commit
736d7c4a5f
@ -23,9 +23,11 @@ namespace DtoImporterService
|
|||||||
loadLocal_categories();
|
loadLocal_categories();
|
||||||
|
|
||||||
// upsert
|
// upsert
|
||||||
|
//Import item may not have no (null) categories
|
||||||
var categoryLadders = importItems
|
var categoryLadders = importItems
|
||||||
|
.Where(i => i.DtoItem.CategoryLadders is not null)
|
||||||
.SelectMany(i => i.DtoItem.CategoryLadders)
|
.SelectMany(i => i.DtoItem.CategoryLadders)
|
||||||
.Select(cl => cl.Ladder)
|
.Select(cl => cl?.Ladder)
|
||||||
.Where(l => l?.Length > 0)
|
.Where(l => l?.Length > 0)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user