From 905ff7dad774d9afd689ccff571c7fc41552f355 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Fri, 8 Dec 2017 13:57:33 -0500 Subject: [PATCH] fix bugs where ask_ var was checked on node --- awx/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/views.py b/awx/api/views.py index 41f9d6a3aa..75f523cdf6 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -627,7 +627,7 @@ class LaunchConfigCredentialsBase(SubListAttachDetachAPIView): ask_field_name = ask_mapping[self.relationship] - if not getattr(parent, ask_field_name): + if not getattr(parent.unified_job_template, ask_field_name): return {"msg": _("Related template is not configured to accept credentials on launch.")} elif sub.unique_hash() in [cred.unique_hash() for cred in parent.credentials.all()]: return {"msg": _("This launch configuration already provides a {credential_type} credential.").format(