Fix colors in graph of boolean questions

This commit is contained in:
Raphael Michel
2020-06-30 23:04:17 +02:00
parent cf2af3c94d
commit d843fc1545

View File

@@ -556,8 +556,8 @@ class QuestionView(EventPermissionRequiredMixin, QuestionMixin, ChartContainingV
if self.object.type == Question.TYPE_BOOLEAN:
for a in qs:
a['alink'] = a['answer']
a['answer'] = gettext('Yes') if a['answer'] == 'True' else gettext('No')
a['answer_bool'] = a['answer'] == 'True'
a['answer'] = gettext('Yes') if a['answer'] == 'True' else gettext('No')
elif self.object.type == Question.TYPE_COUNTRYCODE:
for a in qs:
a['alink'] = a['answer']