From 713b4b5c665d21824dbc4829a7176fc96ab75b43 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Thu, 10 Jan 2019 23:15:36 +0100 Subject: [PATCH] Fix queryset for HostMacIpView --- api/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/views.py b/api/views.py index 8f7b9c1f..3108f9f3 100644 --- a/api/views.py +++ b/api/views.py @@ -611,9 +611,11 @@ class HostMacIpView(generics.ListAPIView): """Exposes the associations between hostname, mac address and IPv4 in order to build the DHCP lease files. """ - queryset = all_active_interfaces() serializer_class = serializers.HostMacIpSerializer + def get_queryset(self): + return all_active_interfaces() + # Firewall @@ -646,7 +648,7 @@ class DNSZonesView(generics.ListAPIView): class DNSReverseZonesView(generics.ListAPIView): - """Exposes the detailed information about each extension (hostnames, + """Exposes the detailed information about each extension (hostnames, IPs, DNS records, etc.) in order to build the DNS zone files. """ queryset = (machines.IpType.objects.all())