Merge main into feature

This commit is contained in:
Jeremy Stretch
2025-04-10 17:17:21 -04:00
parent bb5057c063
commit fc0acb020f
197 changed files with 63438 additions and 53007 deletions

View File

@@ -3,8 +3,10 @@ import logging
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from dcim.exceptions import UnsupportedCablePath
from dcim.models import CablePath, Interface
from dcim.utils import create_cablepath
from utilities.exceptions import AbortRequest
from .models import WirelessLink
@@ -34,7 +36,10 @@ def update_connected_interfaces(instance, created, raw=False, **kwargs):
# Create/update cable paths
if created:
for interface in (instance.interface_a, instance.interface_b):
create_cablepath([interface])
try:
create_cablepath([interface])
except UnsupportedCablePath as e:
raise AbortRequest(e)
@receiver(post_delete, sender=WirelessLink)