Minor patch to right wording for 400 error (#5109)

This commit is contained in:
Alan Rominger 2021-06-21 10:00:56 -04:00 committed by Shane McDonald
parent 11e416995a
commit 0508a9267c
No known key found for this signature in database
GPG Key ID: 6F374AF6E9EB9374

View File

@ -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