From 7870e43bf409da4073349fbc5b33d1c884adccb5 Mon Sep 17 00:00:00 2001 From: Harikrishnan Balagopal Date: Thu, 21 Mar 2024 23:56:52 +0530 Subject: [PATCH] fixup! fix: when using --qa-enable and --qa-disable the answers to disabled questions were not being added to the generated config file Signed-off-by: Harikrishnan Balagopal --- qaengine/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qaengine/engine.go b/qaengine/engine.go index ccf1d634..61031cec 100644 --- a/qaengine/engine.go +++ b/qaengine/engine.go @@ -187,7 +187,7 @@ func FetchAnswer(prob qatypes.Problem) (qatypes.Problem, error) { if isDisabled { logrus.Debugf("the question is from a disabled category so try with default engine") prob, err = defaultEngine.FetchAnswer(prob) - if err != nil { + if err != nil || prob.Answer == nil { return prob, fmt.Errorf("failed to fetch the answer for problem: %+v . Error: %w", prob, err) } }