File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,12 @@ def ready(self):
54
54
# Wildcard exclusion for all models in this app
55
55
if f'{ app_label } .*' in exempt_models :
56
56
continue
57
- branching_models [ app_label ] = [
57
+ models = [
58
58
model for model in models
59
59
if f'{ app_label } .{ model } ' not in exempt_models
60
60
]
61
+ if models :
62
+ branching_models [app_label ] = models
61
63
registry ['model_features' ]['branching' ] = branching_models
62
64
63
65
Original file line number Diff line number Diff line change 12
12
13
13
# Models for which branching support is explicitly disabled
14
14
EXEMPT_MODELS = (
15
+ # Exempt applicable core NetBox models
16
+ 'core.*' ,
17
+ 'extras.branch' ,
18
+ 'extras.customfield' ,
19
+ 'extras.customfieldchoiceset' ,
20
+ 'extras.customlink' ,
21
+ 'extras.eventrule' ,
22
+ 'extras.exporttemplate' ,
23
+ 'extras.notificationgroup' ,
24
+ 'extras.savedfilter' ,
25
+ 'extras.webhook' ,
26
+
27
+ # Exempt all models from this plugin and from netbox-changes
15
28
'netbox_branching.*' ,
16
29
'netbox_changes.*' ,
17
30
)
You can’t perform that action at this time.
0 commit comments