Skip to content

Commit

Permalink
Merge pull request #489 from peteeckel/fix/duplicate-address-error
Browse files Browse the repository at this point in the history
Check whether dns_name set before running post_clean on IP addresses
  • Loading branch information
peteeckel authored Nov 26, 2024
2 parents 4246d20 + 8fd1d70 commit 7df79c1
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 7df79c1

Please sign in to comment.