From 4459bcc632a86df894ff9349d5ce73dded546981 Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Wed, 12 Jun 2024 10:33:31 +0200 Subject: [PATCH] feat: Format experiment collection as markdown in get experiment collection endpoint serializer --- backend/experiment/serializers.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/experiment/serializers.py b/backend/experiment/serializers.py index c9cc71d97..e74b90afe 100644 --- a/backend/experiment/serializers.py +++ b/backend/experiment/serializers.py @@ -24,7 +24,10 @@ def serialize_experiment_collection( serialized = { 'slug': experiment_collection.slug, 'name': experiment_collection.name, - 'description': experiment_collection.description, + 'description': formatter( + experiment_collection.description, + filter_name='markdown' + ), } if experiment_collection.consent: @@ -32,11 +35,14 @@ def serialize_experiment_collection( if experiment_collection.theme_config: serialized['theme'] = serialize_theme( - experiment_collection.theme_config) + experiment_collection.theme_config + ) if experiment_collection.about_content: serialized['aboutContent'] = formatter( - experiment_collection.about_content, filter_name='markdown') + experiment_collection.about_content, + filter_name='markdown' + ) return serialized