mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
Minor patch to right wording for 400 error (#5109)
This commit is contained in:
committed by
Shane McDonald
parent
11e416995a
commit
0508a9267c
@@ -2623,7 +2623,7 @@ class CredentialSerializer(BaseSerializer):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def validate_organization(self, org):
|
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."))
|
raise serializers.ValidationError(_("Galaxy credentials must be owned by an Organization."))
|
||||||
return org
|
return org
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user