Upgrade models to full NetboxModel to allow UI/API interaction:
modified: netbox_dns_bridge/models.py deleted: netbox_dns_bridge/migrations/0003_catalogzone_and_per_zone_identifier.py new file: netbox_dns_bridge/migrations/0003_full_netbox_models.py This assumes the migration starts at v1.5.8. Adjust model access and function calls to match new models: modified: netbox_dns_bridge/signals/netbox_dns_zones.py modified: netbox_dns_bridge/management/commands/dns_transfer_endpoint/catalog_zone_manager.py modified: netbox_dns_bridge/management/commands/dns_transfer_endpoint/request_handler.py Update UI elements and permission interactions: modified: netbox_dns_bridge/filtersets.py modified: netbox_dns_bridge/forms.py modified: netbox_dns_bridge/jobs/notify.py modified: netbox_dns_bridge/navigation.py modified: netbox_dns_bridge/tables.py deleted: netbox_dns_bridge/templates/netbox_dns_bridge/catalog_zone_members.html new file: netbox_dns_bridge/templates/netbox_dns_bridge/catalogzone.html new file: netbox_dns_bridge/templates/netbox_dns_bridge/catalogzonemember.html deleted: netbox_dns_bridge/templates/netbox_dns_bridge/notify_overview.html new file: netbox_dns_bridge/templates/netbox_dns_bridge/seentransferclient.html modified: netbox_dns_bridge/urls.py modified: netbox_dns_bridge/views.py
This commit is contained in:
1 parent
a3f53767e4
commit
a3bc64df62
18 files changed
+596
-352
No files matched your search
@@ -77,15 +77,15 @@ def zone_post_save(sender, instance, created, **kwargs):
|
||||
transaction.on_commit(_on_commit)
|
||||
|
||||
if created:
|
||||
# If zone was created, create catz member identifier record for this zone.
|
||||
catzm.update_member_identifier(zone)
|
||||
# If zone was created, create the catalog zone member record for this zone.
|
||||
catzm.update_member(zone)
|
||||
else:
|
||||
# Re-create the catz member identifier when the zone name or its view
|
||||
# changed. A view move leaves the identifier pointing at the wrong
|
||||
# Re-create the catalog zone member when the zone name or its view
|
||||
# changed. A view move leaves the member pointing at the wrong
|
||||
# catalog zone, so it must be refreshed.
|
||||
old_name = getattr(zone, "_old_name", None)
|
||||
if (old_name and zone.name != old_name) or view_changed:
|
||||
catzm.update_member_identifier(zone)
|
||||
catzm.update_member(zone)
|
||||
|
||||
|
||||
@receiver(post_delete, sender=Zone)
|
||||
|
||||
Reference in new issue
Block a user