mirror of https://github.com/rancher/ui.git
Merge pull request #4062 from westlywright/bug.mac.custom.answer
MC App Upgrade Error
This commit is contained in:
commit
2a382f570b
|
|
@ -332,7 +332,7 @@ export default Component.extend(NewOrEdit, CatalogApp, {
|
|||
|
||||
let nueOverride = {
|
||||
scope: answer.clusterId || answer.projectId,
|
||||
answer: get(answer.values, valueKey),
|
||||
answer: answer.values[valueKey] ? answer.values[valueKey] : null,
|
||||
question: valueKey,
|
||||
isSubQuestion,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,9 +86,13 @@ export default Component.extend({
|
|||
allQuestions.forEach( (q) => {
|
||||
if (questionMatch && questionMatch.variable === q.variable) {
|
||||
if ( q.showSubquestionIf && q.subquestions) {
|
||||
let showSubquestionsIfAnswerIs = q.showSubquestionIf;
|
||||
let answerMatchesSubQuestionIf = false;
|
||||
|
||||
if ( answer.answer.toString() === showSubquestionsIfAnswerIs ) {
|
||||
if (answer.answer && answer.answer.toString) {
|
||||
answerMatchesSubQuestionIf = answer.answer.toString() === q.showSubquestionIf;
|
||||
}
|
||||
|
||||
if (answerMatchesSubQuestionIf) {
|
||||
this.buildSubquestions(q.subquestions);
|
||||
} else {
|
||||
if (this.subquestionAnswers && this.subquestionAnswers.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue