client/skr/models/mixins/SkuLine.coffee in stockor-0.3.0 vs client/skr/models/mixins/SkuLine.coffee in stockor-0.4.0
- old
+ new
@@ -38,10 +38,10 @@
onUomsLoad: ->
uom = this.uom_choices.findWhere(size: @uom_size, code: @uom_code)
this.uom.set( uom.serialize() ) if uom
onSkuChange: ->
- return unless @sku
+ return if @sku.isProxy
sl = @sku.sku_locs.findWhere(sku_id: @sku.id)
if sl
@set(sku_loc: sl)
@uom_choices.options.with.for_sku_loc = sl.id
unless @sku.uoms.isEmpty()