Fix empty ProductLines field exception on writing
This commit is contained in:
parent
46e547e3e2
commit
786a5bfe26
@ -182,7 +182,7 @@ public class ExcelWriter : IWriter, IDisposable
|
||||
previous.Copy(current);
|
||||
current.ClearContents();
|
||||
|
||||
worksheetCells[row, groupColumn].Value2 = positionAmount.Key.ProductLines.First();
|
||||
worksheetCells[row, groupColumn].Value2 = positionAmount.Key.ProductLines.FirstOrDefault() ?? string.Empty;
|
||||
worksheetCells[row, nameColumn].Value2 = positionAmount.Key.Name;
|
||||
|
||||
if (_oldSkuCell != null)
|
||||
|
Loading…
Reference in New Issue
Block a user