def save(self):
        quantity = self.cleaned_data['quantity']
        stock = self.instance.stock
        if stock is not None:
            # update stock allocation
            delta = quantity - self.initial_quantity
            Stock.objects.allocate_stock(stock, delta)
        self.instance.change_quantity(quantity)
        Order.objects.recalculate_order(self.instance.delivery_group.order)
dataset/ETHPy150Open mirumee/saleor/saleor/dashboard/order/forms.py/ChangeQuantityForm.save/original