mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
Fix event_types field class on EventRuleImportForm
This commit is contained in:
parent
1c2b82dedd
commit
36437c644d
@ -8,12 +8,13 @@ from django.utils.translation import gettext_lazy as _
|
||||
from core.models import ObjectType
|
||||
from extras.choices import *
|
||||
from extras.models import *
|
||||
from netbox.events import get_event_type_choices
|
||||
from netbox.forms import NetBoxModelImportForm
|
||||
from users.models import Group, User
|
||||
from utilities.forms import CSVModelForm
|
||||
from utilities.forms.fields import (
|
||||
CSVChoiceField, CSVContentTypeField, CSVModelChoiceField, CSVModelMultipleChoiceField, CSVMultipleContentTypeField,
|
||||
SlugField,
|
||||
CSVChoiceField, CSVContentTypeField, CSVModelChoiceField, CSVModelMultipleChoiceField, CSVMultipleChoiceField,
|
||||
CSVMultipleContentTypeField, SlugField,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
@ -187,6 +188,11 @@ class EventRuleImportForm(NetBoxModelImportForm):
|
||||
queryset=ObjectType.objects.with_feature('event_rules'),
|
||||
help_text=_("One or more assigned object types")
|
||||
)
|
||||
event_types = CSVMultipleChoiceField(
|
||||
choices=get_event_type_choices(),
|
||||
label=_('Event types'),
|
||||
help_text=_('The event type(s) which will trigger this rule')
|
||||
)
|
||||
action_object = forms.CharField(
|
||||
label=_('Action object'),
|
||||
required=True,
|
||||
|
Loading…
Reference in New Issue
Block a user