Fix Order.order_item invocations after param renamed

This commit is contained in:
xmeunier 2024-10-22 20:02:11 +02:00
parent 4cc00173f5
commit 717516726c
2 changed files with 5 additions and 5 deletions

View file

@ -66,7 +66,7 @@ def place_order(request, code):
if error_message: if error_message:
break # stop creating items if there is an error break # stop creating items if there is an error
if quantity > 0: 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 # Redisplay the form with error messages if there is an error
if error_message: if error_message:

View file

@ -40,8 +40,8 @@ def order_items_in_grouped_order(grouped_order):
order = grouped_order.order_set.create(author=author_1) order = grouped_order.order_set.create(author=author_1)
order_2 = grouped_order.order_set.create(author=author_2) order_2 = grouped_order.order_set.create(author=author_2)
order_3 = grouped_order.order_set.create(author=author_3) order_3 = grouped_order.order_set.create(author=author_3)
order.order_item(item=item_1, nb=3) order.order_item(proposed_item=item_1, nb=3)
order.order_item(item=item_2, nb=2) order.order_item(proposed_item=item_2, nb=2)
order_2.order_item(item=item_1, nb=1) order_2.order_item(proposed_item=item_1, nb=1)
order_3.order_item(item=item_2, nb=1) order_3.order_item(proposed_item=item_2, nb=1)
return order return order