Skip to content

Commit

Permalink
fixup! fix: when using --qa-enable and --qa-disable the answers to di…
Browse files Browse the repository at this point in the history
…sabled questions were not being added to the generated config file

Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
  • Loading branch information
HarikrishnanBalagopal committed Mar 21, 2024
1 parent 820b163 commit 7870e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qaengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 7870e43

Please sign in to comment.