diff options
author | Matthew Jones <matburt@redhat.com> | 2016-07-13 17:10:18 +0200 |
---|---|---|
committer | Matthew Jones <matburt@redhat.com> | 2016-07-13 17:10:18 +0200 |
commit | e9afee6149381b7605c1fe82a1f9fd37b371b171 (patch) | |
tree | 081ab37eb002ab42605dc8c338d3398b397dca10 | |
parent | Fix an ommitted fields 500 error (diff) | |
download | awx-e9afee6149381b7605c1fe82a1f9fd37b371b171.tar.xz awx-e9afee6149381b7605c1fe82a1f9fd37b371b171.zip |
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.
-rw-r--r-- | awx/api/serializers.py | 8 |
1 files changed, 0 insertions, 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 = [] |