Skip to content

Commit

Permalink
Check whether dns_name set before running post_clean on IP addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
peteeckel committed Nov 26, 2024
1 parent 4246d20 commit 8fd1d70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions netbox_dns/signals/ipam_dnssync.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

@receiver(post_clean, sender=IPAddress)
def ipam_dnssync_ipaddress_post_clean(instance, **kwargs):
if not instance.dns_name:
return

if not isinstance(instance.address, IPNetwork):
return

Expand Down

0 comments on commit 8fd1d70

Please sign in to comment.