From 2ee2563e61e0f3ec250d621936ad1f5309f9ac40 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Wed, 6 May 2015 14:39:16 -0400 Subject: [PATCH] fixed variable name in fieldIsAutopopulatable function --- awx/ui/static/js/helpers/Lookup.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/static/js/helpers/Lookup.js b/awx/ui/static/js/helpers/Lookup.js index f001c8aa3c..0dceb91511 100644 --- a/awx/ui/static/js/helpers/Lookup.js +++ b/awx/ui/static/js/helpers/Lookup.js @@ -69,11 +69,11 @@ export default // this logic makes sure that the form is being added, and that the lookup to be autopopulated is required function fieldIsAutopopulatable() { if (parent_scope.mode === "add") { - if (parent_scope[form.fields[field].sourceModel + "_field"].awRequiredWhen && - parent_scope[form.fields[field].sourceModel + "_field"].awRequiredWhen.variable && - parent_scope[parent_scope[form.fields[field].sourceModel + "_field"].awRequiredWhen.variable]) { + if (parent_scope[sourceModel + "_field"].awRequiredWhen && + parent_scope[sourceModel + "_field"].awRequiredWhen.variable && + parent_scope[parent_scope[sourceModel + "_field"].awRequiredWhen.variable]) { return true; - } else if (parent_scope[form.fields[field].sourceModel + "_field"].addRequired === true) { + } else if (parent_scope[sourceModel + "_field"].addRequired === true) { return true; } else { return false;