Skip to content

Commit 0937bf0

Browse files
committed
Fix assignment bug in fetch_q_and_a
1 parent 3c6082a commit 0937bf0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/presenters/api/v2/research_output_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def fetch_q_and_a(themes:)
6262
ret = themes.map do |theme|
6363
qs = @plan.questions.select { |q| q.themes.collect(&:title).include?(theme) }
6464
descr = qs.map do |q|
65-
a = @plan.answers.find { |ans| ans.question_id = q.id }
65+
a = @plan.answers.find { |ans| ans.question_id == q.id }
6666
next unless a.present? && !a.blank?
6767

6868
"<strong>Question:</strong> #{q.text}<br><strong>Answer:</strong> #{a.text}"

0 commit comments

Comments
 (0)