Skip to content

Commit

Permalink
Merge pull request #12 from mmahacek/dns-interface-check
Browse files Browse the repository at this point in the history
Updated DNS interface checking
  • Loading branch information
mmahacek authored Apr 20, 2021
2 parents 5b8b51c + 69f46ee commit 19b52b5
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 19b52b5

Please sign in to comment.