From 0508a9267c0dad753130adad644d91e57334b8ca Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 21 Jun 2021 10:00:56 -0400 Subject: [PATCH] Minor patch to right wording for 400 error (#5109) --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index a98e2271b6..ab91385d44 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -2623,7 +2623,7 @@ class CredentialSerializer(BaseSerializer): return ret def validate_organization(self, org): - if self.instance and self.instance.credential_type.kind == 'galaxy' and org is None: + if self.instance and (not self.instance.managed) and self.instance.credential_type.kind == 'galaxy' and org is None: raise serializers.ValidationError(_("Galaxy credentials must be owned by an Organization.")) return org