From 6c7b39684f4938f14e913d06205fd19ea87f29c9 Mon Sep 17 00:00:00 2001 From: Aleksey Zverev Date: Sat, 14 Oct 2023 07:01:42 +0300 Subject: [PATCH] Fix npe with OZON --- server/app/internal/mapper/fbo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/app/internal/mapper/fbo.go b/server/app/internal/mapper/fbo.go index 0a3b076..d3d4cb1 100644 --- a/server/app/internal/mapper/fbo.go +++ b/server/app/internal/mapper/fbo.go @@ -56,6 +56,7 @@ func MapFBOToOrder(fbo *api.FBO, transactionId int64, source string, ownerCode s totalDiscountPercent = finData[product.Sku].TotalDiscountPercent totalDiscountValue = finData[product.Sku].TotalDiscountValue } + saleSate := fbo.ShipmentDate.ToTime() orders[i] = model.Order{ TransactionID: transactionId, @@ -89,7 +90,7 @@ func MapFBOToOrder(fbo *api.FBO, transactionId int64, source string, ownerCode s BarcodeId: barcodeId, ItemId: itemId, Message: message, - SaleDate: fbo.ShipmentDate.ToTime(), + SaleDate: &saleSate, } } return &orders, nil