modified: CHANGELOG.md modified: netbox_dns_bridge/signals/netbox_dns_zones.py Defer catalog zone SOA serial increment to transaction.on_commit on zone deletion, matching the create/modify path and making delete rollback-safe
This commit is contained in:
1 parent
ddef4965d6
commit
e8762bf807
2 files changed
+7
-1
No files matched your search
@@ -1,4 +1,7 @@
|
||||
## Unreleased
|
||||
- Defer the catalog zone SOA serial increment on zone deletion to `transaction.on_commit`, matching
|
||||
the create/modify path. Previously the increment ran immediately at `post_delete` time, so a
|
||||
rollback of the delete transaction would have left the catalog serial bumped anyway.
|
||||
- Add the option to send a NOTIFY directly to a zone's own nameservers when its SOA serial number
|
||||
changes. Enable it per zone via a boolean custom field named by `notify_ns_custom_field_name`,
|
||||
globally for all zones via `notify_ns_all_zones` (default `False`), or both. Nameserver addresses
|
||||
|
||||
@@ -72,7 +72,10 @@ def zone_post_save(sender, instance, created, **kwargs):
|
||||
|
||||
@receiver(post_delete, sender=Zone)
|
||||
def zone_post_delete(sender, instance, **kwargs):
|
||||
catzm.increment_soa_serial()
|
||||
def _on_commit():
|
||||
catzm.increment_soa_serial()
|
||||
|
||||
transaction.on_commit(_on_commit)
|
||||
|
||||
|
||||
def _notify_ns_enabled(zone) -> bool:
|
||||
|
||||
Reference in new issue
Block a user