     delete price._id
     action =
       action: 'removePrice'
-      variantId: variant.id
+      variantId: getVariantId variant
       price: price
   action
 

    # patch 'prices' to have an identifier in order for the diff
    # to be able to match nested objects in arrays
    # e.g.: prices: [ { _id: x, value: {} } ]
    patchPrices = (obj) ->
      _.each allVariants(obj), (variant) ->
        if variant.prices
          _.each variant.prices, (price, index) ->
            price._id = index

    patchPrices(old_obj)
    patchPrices(new_obj)

    isEnum = (value) -> _.has(value, 'key') and _.has(value, 'label')


    price.value.centAmount = helper.getDeltaValue(centAmountDiff)
    action =
      action: 'changePrice'
      variantId: getVariantId variant
      price: price
  action

