8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 22:52:26 +00:00

Fix : mauvais filtre quand on pas le droit cableur

This commit is contained in:
Maël Kervella 2017-11-02 13:43:41 +00:00
parent 5064f50b1c
commit 7290afc7f0

View file

@ -123,7 +123,7 @@ def get_results(query, request, filters={}):
interface__domain__related_domain__name__icontains = query interface__domain__related_domain__name__icontains = query
) )
if not request.user.has_perms(('cableur',)): 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'] = Machine.objects.filter(filter_machine_list)
results['machines_list'] = SortTable.sort( results['machines_list'] = SortTable.sort(
results['machines_list'], results['machines_list'],