1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #9788: Ensure denormalized fields on CableTermination are kept in sync with related objects

This commit is contained in:
jeremystretch
2022-08-02 13:56:52 -04:00
parent e96620260a
commit d3a567a2f5
2 changed files with 18 additions and 1 deletions

View File

@@ -1,10 +1,26 @@
from django.apps import AppConfig
from netbox import denormalized
class DCIMConfig(AppConfig):
name = "dcim"
verbose_name = "DCIM"
def ready(self):
import dcim.signals
from .models import CableTermination
# Register denormalized fields
denormalized.register(CableTermination, '_device', {
'_rack': 'rack',
'_location': 'location',
'_site': 'site',
})
denormalized.register(CableTermination, '_rack', {
'_location': 'location',
'_site': 'site',
})
denormalized.register(CableTermination, '_location', {
'_site': 'site',
})