mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 14:42:25 +00:00
Application du filter
This commit is contained in:
parent
b3c97a0680
commit
72e3c27b1f
1 changed files with 4 additions and 4 deletions
|
@ -726,11 +726,11 @@ class JSONResponse(HttpResponse):
|
||||||
@login_required
|
@login_required
|
||||||
@permission_required('serveur')
|
@permission_required('serveur')
|
||||||
def mac_ip_list(request):
|
def mac_ip_list(request):
|
||||||
interfaces = Interface.objects.select_related('ipv4').select_related('domain').all()
|
interf = Interface.objects.select_related('ipv4').select_related('domain__extension').all()
|
||||||
filter(
|
interfaces = list(filter(
|
||||||
lambda interface: interface.ipv4 and interface.is_active(),
|
lambda interface: interface.ipv4 and interface.is_active(),
|
||||||
interfaces
|
interf
|
||||||
)
|
))
|
||||||
seria = InterfaceSerializer(interfaces, many=True)
|
seria = InterfaceSerializer(interfaces, many=True)
|
||||||
return seria.data
|
return seria.data
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue