Skip to content

Commit

Permalink
Updated DNS interface checking
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahacek authored Apr 6, 2020
1 parent 5b8b51c commit 69f46ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reports/ipam-reports/dns-reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Check_DNS_A_Record(Report):

def test_dna_a_record(self):
for device in Device.objects.filter(status=DeviceStatusChoices.STATUS_ACTIVE):
if device.interfaces is None:
if not device.interfaces.exists():
continue
if device.name is None:
self.log_info(device, "No device name")
Expand All @@ -37,7 +37,7 @@ class Check_DNS_AAAA_Record(Report):

def test_dns_aaaa_record(self):
for device in Device.objects.filter(status=DeviceStatusChoices.STATUS_ACTIVE):
if device.interfaces is None:
if not device.interfaces.exists():
continue
if device.name is None:
self.log_info(device, "No device name")
Expand All @@ -63,4 +63,4 @@ def test_dns_aaaa_record(self):
except dns.resolver.NoAnswer:
self.log_success(device)
except dns.resolver.NXDOMAIN:
self.log_success(device)
self.log_success(device)

0 comments on commit 69f46ee

Please sign in to comment.