mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Minor patch to right wording for 400 error (#5109)
This commit is contained in:
parent
11e416995a
commit
0508a9267c
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user