diff --git a/la_chariotte/order/views/order.py b/la_chariotte/order/views/order.py index d80fbad..07f938a 100644 --- a/la_chariotte/order/views/order.py +++ b/la_chariotte/order/views/order.py @@ -66,7 +66,7 @@ def place_order(request, code): if error_message: break # stop creating items if there is an error if quantity > 0: - order.order_item(nb=quantity, item=item) + order.order_item(nb=quantity, proposed_item=item) # Redisplay the form with error messages if there is an error if error_message: diff --git a/la_chariotte/tests/utils.py b/la_chariotte/tests/utils.py index 10db706..c8339bb 100644 --- a/la_chariotte/tests/utils.py +++ b/la_chariotte/tests/utils.py @@ -40,8 +40,8 @@ def order_items_in_grouped_order(grouped_order): order = grouped_order.order_set.create(author=author_1) order_2 = grouped_order.order_set.create(author=author_2) order_3 = grouped_order.order_set.create(author=author_3) - order.order_item(item=item_1, nb=3) - order.order_item(item=item_2, nb=2) - order_2.order_item(item=item_1, nb=1) - order_3.order_item(item=item_2, nb=1) + order.order_item(proposed_item=item_1, nb=3) + order.order_item(proposed_item=item_2, nb=2) + order_2.order_item(proposed_item=item_1, nb=1) + order_3.order_item(proposed_item=item_2, nb=1) return order