1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #12103: Limit the types of objects available for object count & list widgets

This commit is contained in:
jeremystretch
2023-03-31 15:30:40 -04:00
parent 6a85c5b3ce
commit 8d6c591535
2 changed files with 5 additions and 1 deletions

View File

@ -70,6 +70,7 @@ Two new webhook trigger events have been introduced: `job_start` and `job_end`.
### Bug Fixes (From Beta1)
* [#12103](https://github.com/netbox-community/netbox/issues/12103) - Limit the types of objects available for object count & list widgets
* [#12105](https://github.com/netbox-community/netbox/issues/12105) - Prevent data sources from becoming stuck in "syncing" status when an exception is raised
* [#12106](https://github.com/netbox-community/netbox/issues/12106) - Fix exception when saving dashboard widget with minimum width/height
* [#12108](https://github.com/netbox-community/netbox/issues/12108) - Limit the draggable area of widgets to their headers

View File

@ -11,6 +11,7 @@ from django.template.loader import render_to_string
from django.urls import NoReverseMatch, reverse
from django.utils.translation import gettext as _
from extras.utils import FeatureQuery
from utilities.forms import BootstrapMixin
from utilities.permissions import get_permission_for_model
from utilities.templatetags.builtins.filters import render_markdown
@ -29,7 +30,9 @@ __all__ = (
def get_content_type_labels():
return [
(content_type_identifier(ct), content_type_name(ct))
for ct in ContentType.objects.order_by('app_label', 'model')
for ct in ContentType.objects.filter(
FeatureQuery('export_templates').get_query()
).order_by('app_label', 'model')
]