8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-23 20:03:11 +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 9dc89c3a69
commit 5c3cf78b28

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'],