customizations icon indicating copy to clipboard operation
customizations copied to clipboard

dns-reports is reporting on devices with no interfaces

Open acaronmd opened this issue 5 years ago • 0 comments

dns-reports checks for dns entries for devices with IPs assigned to an interface. This line filters out devices with no interfaces, but in my case, it still returns devices with no interfaces, because it returns an empty QuerySet https://github.com/netbox-community/reports/blob/9b4a4fab71c5a10469988f362f410b295b9f317e/reports/ipam-reports/dns-reports.py#L13

I've fixed the issue locally by replacing it with this line. if not device.interfaces.exists():

http://docs.djangoproject.com/en/dev/ref/models/querysets/#exists

acaronmd avatar Apr 05 '20 20:04 acaronmd