Fix null reference exception on empty measure field.
This commit is contained in:
parent
786a5bfe26
commit
b06df453d2
@ -110,7 +110,7 @@ public class ExcelReader : IReader, IDisposable
|
|||||||
object name = worksheet.Cells[row, NameCell.Column].Value2;
|
object name = worksheet.Cells[row, NameCell.Column].Value2;
|
||||||
object sku = worksheet.Cells[row, SkuCell.Column].Value2;
|
object sku = worksheet.Cells[row, SkuCell.Column].Value2;
|
||||||
object measure = worksheet.Cells[row, MeasureCell.Column].Value2;
|
object measure = worksheet.Cells[row, MeasureCell.Column].Value2;
|
||||||
var productMeasure = measure.ToString() switch
|
var productMeasure = measure?.ToString() switch
|
||||||
{
|
{
|
||||||
"м" => Measure.M,
|
"м" => Measure.M,
|
||||||
"шт" => Measure.P,
|
"шт" => Measure.P,
|
||||||
|
Loading…
Reference in New Issue
Block a user