Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions netbox/netbox/models/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ def has_feature(model_or_ct, feature):
# If a ContentType was passed, resolve its model class and run the associated feature test
elif type(model_or_ct) is ContentType:
model = model_or_ct.model_class()
if model is None: # Stale content type
return False
try:
test_func = registry['model_features'][feature]
except KeyError:
Expand Down