Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Fix update skus
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmabc committed Apr 21, 2020
1 parent c35b732 commit a6dcfa7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions repo/listing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a6dcfa7

Please sign in to comment.