mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
Misc cleanup
This commit is contained in:
parent
00dc9c464b
commit
d3668ce328
@ -125,12 +125,6 @@ class EventRule(CustomFieldsMixin, ExportTemplatesMixin, TagsMixin, ChangeLogged
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
# At least one action type must be selected
|
||||
if not self.event_types:
|
||||
raise ValidationError(
|
||||
_("At least one event type must be selected: create, update, delete, job start, and/or job end.")
|
||||
)
|
||||
|
||||
# Validate that any conditions are in the correct format
|
||||
if self.conditions:
|
||||
try:
|
||||
|
@ -298,7 +298,7 @@ class ConditionSetTest(TestCase):
|
||||
webhook = Webhook.objects.create(name='Webhook 100', payload_url='http://example.com/?1', http_method='POST')
|
||||
form = EventRuleForm({
|
||||
"name": "Event Rule 1",
|
||||
'event_types': [OBJECT_CREATED, OBJECT_UPDATED],
|
||||
"event_types": [OBJECT_CREATED, OBJECT_UPDATED],
|
||||
"action_object_type": ct.pk,
|
||||
"action_type": "webhook",
|
||||
"action_choice": webhook.pk,
|
||||
|
Loading…
Reference in New Issue
Block a user