Commit bea9adb0 authored by Patrick's avatar Patrick

Django 1.10 change in query <only()> management

parent b83117a3
......@@ -22,9 +22,9 @@ def order_ajax(request):
user = request.user
if not user.is_authenticated():
raise Http404
customer = Customer.objects.filter(user_id=user.id, is_active=True, may_order=True) \
.only("id", "vat_id") \
.order_by('?').first()
customer = Customer.objects.filter(
user_id=user.id, is_active=True, may_order=True
).order_by('?').first()
if customer is None:
raise Http404
offer_item_id = sint(request.GET.get('offer_item', 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment