diff --git a/osinaweb/billing/add/__pycache__/views.cpython-310.pyc b/osinaweb/billing/add/__pycache__/views.cpython-310.pyc index e0f32bfb..31911899 100644 Binary files a/osinaweb/billing/add/__pycache__/views.cpython-310.pyc and b/osinaweb/billing/add/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index a1f992e2..6ba494b8 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-310.pyc and b/osinaweb/customercore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index de0761e4..8bc58a60 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -299,12 +299,12 @@ def check_order_status(request, merchant_id, order_id): } response = requests.post(api_url, json=api_data) order_item.active = True - old_order_items = OrderItem.objects.exclude(order__id=order_id).filter(item__item_type__name='OSIMENU') + old_order_items = OrderItem.objects.exclude(order__id=order.id).filter(item__item_type__name='OSIMENU') for item in old_order_items: item.active = False item.save() order_item.save() - add_invoice_pdf(request, order.id) + add_invoice_pdf(request, order_id=order.id) return redirect('orders') error_message = 'Failed to retrieve order details: ' + response.text return JsonResponse({'error': error_message}, status=500)