fix
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 34s
Build and Publish / BuildAndDeployArm64 (push) Successful in 3m43s

This commit is contained in:
matst80
2025-11-27 20:28:10 +01:00
parent db61413988
commit c2873ebfc0

View File

@@ -230,7 +230,11 @@ func (c *CartGrain) GetCurrentState() (*CartGrain, error) {
func (c *CartGrain) HandleInventoryChange(change inventory.InventoryChange) {
for _, item := range c.Items {
if item.Sku == change.SKU && change.StockLocationID == *item.StoreId {
l := "se"
if item.StoreId != nil {
l = *item.StoreId
}
if item.Sku == change.SKU && change.StockLocationID == l {
item.Stock = uint16(change.Value)
break
}