From 47a99aba504fde73d6899869d578c5d4fb409196 Mon Sep 17 00:00:00 2001 From: Jochen Klar Date: Tue, 21 Jun 2016 11:57:35 +0200 Subject: [PATCH] fix help text for questions --- apps/questions/serializers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/questions/serializers.py b/apps/questions/serializers.py index 9626055f83..9f82c36de6 100644 --- a/apps/questions/serializers.py +++ b/apps/questions/serializers.py @@ -145,6 +145,14 @@ class Meta: 'attribute', ) + def to_representation(self, instance): + response = super(QuestionEntityQuestionSerializer, self).to_representation(instance) + + if 'help' in response and response['help']: + response['help'] = markdown_function(force_text(response['help'])) + + return response + class QuestionEntitySerializer(serializers.ModelSerializer):