mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 21:07:39 -02:30
allow smart inventory to be created
related to https://github.com/ansible/ansible-tower/issues/7261
This commit is contained in:
@@ -370,7 +370,7 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin):
|
||||
return self.groups.exclude(parents__pk__in=group_pks).distinct()
|
||||
|
||||
def clean_insights_credential(self):
|
||||
if self.kind == 'smart':
|
||||
if self.kind == 'smart' and self.insights_credential:
|
||||
raise ValidationError(_("Assignment not allowed for Smart Inventory"))
|
||||
if self.insights_credential and self.insights_credential.credential_type.kind != 'insights':
|
||||
raise ValidationError(_("Credential kind must be 'insights'."))
|
||||
|
||||
Reference in New Issue
Block a user