#3892: Convert GRAPH_MODELS to a Q object

This commit is contained in:
Jeremy Stretch
2020-01-15 16:08:19 -05:00
parent 09bee75cb3
commit f81e7d30e2
5 changed files with 18 additions and 9 deletions

View File

@@ -70,11 +70,15 @@ CUSTOMLINK_MODELS = Q(
)
# Models which can have Graphs associated with them
GRAPH_MODELS = (
'circuits.provider',
'dcim.device',
'dcim.interface',
'dcim.site',
GRAPH_MODELS = Q(
Q(app_label='circuits', model__in=[
'provider',
]) |
Q(app_label='dcim', model__in=[
'device',
'interface',
'site',
])
)
# Models which support export templates