From 7290afc7f01c684eadb3b6ce19a28bc43e4e4b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Thu, 2 Nov 2017 13:43:41 +0000 Subject: [PATCH] Fix : mauvais filtre quand on pas le droit cableur --- search/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/views.py b/search/views.py index 318e0269..79c0c5c4 100644 --- a/search/views.py +++ b/search/views.py @@ -123,7 +123,7 @@ def get_results(query, request, filters={}): interface__domain__related_domain__name__icontains = query ) if not request.user.has_perms(('cableur',)): - filter_machine_list &= Q(machine__user__id=request.user.id) + filter_machine_list &= Q(user__id=request.user.id) results['machines_list'] = Machine.objects.filter(filter_machine_list) results['machines_list'] = SortTable.sort( results['machines_list'],