mirror of
https://github.com/ansible/awx.git
synced 2026-01-23 15:38:06 -03:30
Require organization when creating new notification templates
This commit is contained in:
parent
9e0f01a29f
commit
2528952090
@ -2429,6 +2429,8 @@ class NotificationTemplateSerializer(BaseSerializer):
|
||||
notification_type = self.instance.notification_type
|
||||
if not notification_type:
|
||||
raise serializers.ValidationError('Missing required fields for Notification Configuration: notification_type')
|
||||
if not 'organization' in attrs:
|
||||
raise serializers.ValidationError("Missing 'organization' from required fields")
|
||||
|
||||
notification_class = NotificationTemplate.CLASS_FOR_NOTIFICATION_TYPE[notification_type]
|
||||
missing_fields = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user