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

Application du filter

This commit is contained in:
Gabriel Detraz 2017-02-02 14:52:26 +01:00 committed by root
parent 7afd446438
commit 7b70be4b92

View file

@ -726,11 +726,11 @@ class JSONResponse(HttpResponse):
@login_required
@permission_required('serveur')
def mac_ip_list(request):
interfaces = Interface.objects.select_related('ipv4').select_related('domain').all()
filter(
interf = Interface.objects.select_related('ipv4').select_related('domain__extension').all()
interfaces = list(filter(
lambda interface: interface.ipv4 and interface.is_active(),
interfaces
)
interf
))
seria = InterfaceSerializer(interfaces, many=True)
return seria.data