From a137114bac424cd6bb002829ecf26b92ccfa68ec Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Fri, 6 Dec 2024 16:08:30 +0100 Subject: [PATCH] Serialize RO/TO pertinence, motivation, resources display values --- backend/ebios_rm/serializers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/ebios_rm/serializers.py b/backend/ebios_rm/serializers.py index 62ab8aa03..4b5a0d9d2 100644 --- a/backend/ebios_rm/serializers.py +++ b/backend/ebios_rm/serializers.py @@ -94,6 +94,10 @@ class RoToReadSerializer(BaseModelSerializer): folder = FieldsRelatedField() feared_events = FieldsRelatedField(["folder", "id"], many=True) + pertinence = serializers.CharField(source="get_pertinence_display") + motivation = serializers.CharField(source="get_motivation_display") + resources = serializers.CharField(source="get_resources_display") + class Meta: model = RoTo fields = "__all__"