From e9afee6149381b7605c1fe82a1f9fd37b371b171 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 13 Jul 2016 11:10:18 -0400 Subject: [PATCH] Revert required org on notification templates This reverts the validation of a required Organization on the Notification Template. After discussion with jlaska and jladd, I think this can behave fine in this situation. It's more like a Credential then where without an Organization the NT only becomes available to Super Users and the creator of the NT. --- awx/api/serializers.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 3680b1819c..2f58b776f4 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -2429,16 +2429,8 @@ class NotificationTemplateSerializer(BaseSerializer): notification_type = self.instance.notification_type else: notification_type = None - if 'organization' in attrs: - organization = attrs['organization'] - elif self.instance: - organization = self.instance.organization - else: - organization = None if not notification_type: raise serializers.ValidationError('Missing required fields for Notification Configuration: notification_type') - if not organization: - raise serializers.ValidationError("Missing 'organization' from required fields") notification_class = NotificationTemplate.CLASS_FOR_NOTIFICATION_TYPE[notification_type] missing_fields = []