mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-27 15:47:46 -06:00
Fixes #19987: Show changelog_message field only for models which support change logging
This commit is contained in:
@@ -11,7 +11,7 @@ from ipam.choices import VLANQinQRoleChoices
|
||||
from ipam.models import ASN, VLAN, VLANGroup, VRF
|
||||
from netbox.choices import *
|
||||
from netbox.forms import NetBoxModelBulkEditForm
|
||||
from netbox.forms.mixins import ChangeLoggingMixin
|
||||
from netbox.forms.mixins import ChangelogMessageMixin
|
||||
from tenancy.models import Tenant
|
||||
from users.models import User
|
||||
from utilities.forms import BulkEditForm, add_blank_choice, form_from_model
|
||||
@@ -1038,7 +1038,7 @@ class PowerFeedBulkEditForm(NetBoxModelBulkEditForm):
|
||||
# Device component templates
|
||||
#
|
||||
|
||||
class ComponentTemplateBulkEditForm(ChangeLoggingMixin, BulkEditForm):
|
||||
class ComponentTemplateBulkEditForm(ChangelogMessageMixin, BulkEditForm):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from extras.models import ConfigTemplate
|
||||
from ipam.choices import VLANQinQRoleChoices
|
||||
from ipam.models import ASN, IPAddress, VLAN, VLANGroup, VLANTranslationPolicy, VRF
|
||||
from netbox.forms import NetBoxModelForm
|
||||
from netbox.forms.mixins import ChangeLoggingMixin
|
||||
from netbox.forms.mixins import ChangelogMessageMixin
|
||||
from tenancy.forms import TenancyForm
|
||||
from users.models import User
|
||||
from utilities.forms import add_blank_choice, get_field_value
|
||||
@@ -974,7 +974,7 @@ class VCMemberSelectForm(forms.Form):
|
||||
# Device component templates
|
||||
#
|
||||
|
||||
class ComponentTemplateForm(ChangeLoggingMixin, forms.ModelForm):
|
||||
class ComponentTemplateForm(ChangelogMessageMixin, forms.ModelForm):
|
||||
device_type = DynamicModelChoiceField(
|
||||
label=_('Device type'),
|
||||
queryset=DeviceType.objects.all(),
|
||||
|
||||
Reference in New Issue
Block a user