Skip to content

Commit a0f0b29

Browse files
Merge pull request #12382 from kkthxbye-code/12380-widget-fix-missing-ct
Fixes #12380 - Add ObjectChange as a valid option for ObjectListWidget and ObjectCountsWidget
2 parents f86f4f9 + aabaeec commit a0f0b29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

netbox/extras/dashboard/widgets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from django.conf import settings
99
from django.contrib.contenttypes.models import ContentType
1010
from django.core.cache import cache
11+
from django.db.models import Q
1112
from django.template.loader import render_to_string
1213
from django.urls import NoReverseMatch, reverse
1314
from django.utils.translation import gettext as _
@@ -33,7 +34,7 @@ def get_content_type_labels():
3334
return [
3435
(content_type_identifier(ct), content_type_name(ct))
3536
for ct in ContentType.objects.filter(
36-
FeatureQuery('export_templates').get_query()
37+
FeatureQuery('export_templates').get_query() | Q(app_label='extras', model='objectchange')
3738
).order_by('app_label', 'model')
3839
]
3940

0 commit comments

Comments
 (0)