mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
Fixes: #21040 - Registered denormalized fields (#20503)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
This commit is contained in:
parent
b70f1211ab
commit
f5ed095738
@ -1,5 +1,7 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
from netbox import denormalized
|
||||||
|
|
||||||
|
|
||||||
class CircuitsConfig(AppConfig):
|
class CircuitsConfig(AppConfig):
|
||||||
name = "circuits"
|
name = "circuits"
|
||||||
@ -8,6 +10,16 @@ class CircuitsConfig(AppConfig):
|
|||||||
def ready(self):
|
def ready(self):
|
||||||
from netbox.models.features import register_models
|
from netbox.models.features import register_models
|
||||||
from . import signals, search # noqa: F401
|
from . import signals, search # noqa: F401
|
||||||
|
from .models import CircuitTermination
|
||||||
|
|
||||||
# Register models
|
# Register models
|
||||||
register_models(*self.get_models())
|
register_models(*self.get_models())
|
||||||
|
|
||||||
|
denormalized.register(CircuitTermination, '_site', {
|
||||||
|
'_region': 'region',
|
||||||
|
'_site_group': 'group',
|
||||||
|
})
|
||||||
|
|
||||||
|
denormalized.register(CircuitTermination, '_location', {
|
||||||
|
'_site': 'site',
|
||||||
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user