modified: netbox_dns_bridge/catalog_zone_manager.py
modified: netbox_dns_bridge/management/commands/dns-transfer-endpoint.py modified: netbox_dns_bridge/request_handler.py modified: netbox_dns_bridge/signals/netbox_dns_zones.py Range of bug fixes and improvements
This commit is contained in:
1 parent
b72fa9b664
commit
fd8a5a0d9d
5 files changed
+50
-82
No files matched your search
@@ -27,13 +27,15 @@ def zone_post_save(sender, instance, created, **kwargs):
|
||||
zone = instance
|
||||
|
||||
# Quit if this is not the first signal in this session for this zone.
|
||||
request = current_request.get()
|
||||
if request is not None:
|
||||
try:
|
||||
request = current_request.get()
|
||||
handled_zones = getattr(request, "_handled_zones", set())
|
||||
if zone.pk in handled_zones:
|
||||
return
|
||||
handled_zones.add(zone.pk)
|
||||
request._handled_zones = handled_zones
|
||||
except LookupError:
|
||||
pass
|
||||
|
||||
# On commit, increment soa serial and if notify is enabled, schedule bg job.
|
||||
def _on_commit():
|
||||
@@ -53,6 +55,7 @@ def zone_post_save(sender, instance, created, **kwargs):
|
||||
if old_name and zone.name != old_name:
|
||||
catzm.update_member_identifier(zone)
|
||||
|
||||
|
||||
@receiver(post_delete, sender=Zone)
|
||||
def zone_post_delete(sender, instance, **kwargs):
|
||||
catzm.increment_soa_serial()
|
||||
Reference in new issue
Block a user