Skip to content

Commit

Permalink
Removed reference to ACTIVE_STATUS_LIST for zones and records
Browse files Browse the repository at this point in the history
  • Loading branch information
peteeckel committed Oct 22, 2024
1 parent 3be31d0 commit 6586d66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/custom-scripts/NetBox_DNS_Exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run(self, data, commit):
return

for view in views:
zones = Zone.objects.filter(view=view, status__in=Zone.ACTIVE_STATUS_LIST)
zones = Zone.objects.filter(view=view, active=True)
if len(zones):
self.log_info(f"Exporting zones for view '{view.name}'")
self.export_zones(zones, view.name, export_path)
Expand All @@ -88,7 +88,7 @@ def export_zones(self, zones, view_name, export_path):

for zone in zones:
self.log_info(f"Exporting zone {zone}")
records = Record.objects.filter(zone=zone, status__in=Record.ACTIVE_STATUS_LIST)
records = Record.objects.filter(zone=zone, active=True)

zone_data = self.template.render({"zone": zone, "records": records})

Expand Down

0 comments on commit 6586d66

Please sign in to comment.