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:
@@ -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',
|
||||
})
|
||||
|
Reference in New Issue
Block a user