From 0157a095a3dc28df97a56e447d611e84f5bc517a Mon Sep 17 00:00:00 2001 From: Brian Hoffman Date: Mon, 20 Apr 2020 21:27:08 -0400 Subject: [PATCH] Fix update skus --- repo/listing.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/repo/listing.go b/repo/listing.go index 92c80a232b..e555697c4f 100644 --- a/repo/listing.go +++ b/repo/listing.go @@ -185,6 +185,18 @@ func UpdateListing(r []byte, isTestnet bool, dstore *Datastore, repoPath string) if err != nil { return Listing{}, err } + skus := ld.Item.Skus + for _, sku := range skus { + if sku.BigSurcharge == "" { + sku.BigSurcharge = "0" + } + if sku.BigQuantity == "" { + sku.BigQuantity = "0" + } + } + + ld.Item.Skus = skus + slug := ld.Slug exists, err := listingExists(slug, repoPath, isTestnet) if err != nil {