Commit 2ca28c7b authored by Amap's avatar Amap

Applique la limite aux commandes

parent 3fdb5a32
......@@ -63,7 +63,7 @@ def search_result(search, type, request):
if i == '1':
panier = Panier.objects.filter(nom__icontains = search)[:SEARCH_RESULT]
if i == '2':
commande = Commande.objects.filter(Q(date=Livraison.objects.filter(date_query)) & query)
commande = Commande.objects.filter(Q(date=Livraison.objects.filter(date_query)) & query)[:SEARCH_RESULT]
if not request.user.has_perms(('bureau',)):
commande = commande.filter(user=request.user)[:SEARCH_RESULT]
if i == '3':
......
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