mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 13:25:02 -02:30
remove requirement for galaxy credentials to belong to an organization (#16075)
This commit is contained in:
@@ -3027,11 +3027,6 @@ class CredentialSerializer(BaseSerializer):
|
|||||||
ret.remove(field)
|
ret.remove(field)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def validate_organization(self, org):
|
|
||||||
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
|
|
||||||
|
|
||||||
def validate_credential_type(self, credential_type):
|
def validate_credential_type(self, credential_type):
|
||||||
if self.instance and credential_type.pk != self.instance.credential_type.pk:
|
if self.instance and credential_type.pk != self.instance.credential_type.pk:
|
||||||
for related_objects in (
|
for related_objects in (
|
||||||
|
|||||||
Reference in New Issue
Block a user