diff --git a/app/core/api/serializers.py b/app/core/api/serializers.py index eccb3902..eabd2ae9 100644 --- a/app/core/api/serializers.py +++ b/app/core/api/serializers.py @@ -101,6 +101,8 @@ class Meta: class ProjectSerializer(serializers.ModelSerializer): """Used to retrieve project info""" + sdgs = serializers.StringRelatedField(many=True) + class Meta: model = Project fields = ( @@ -117,6 +119,7 @@ class Meta: "image_logo", "image_hero", "image_icon", + "sdgs", ) read_only_fields = ( "uuid", @@ -309,6 +312,8 @@ class SdgSerializer(serializers.ModelSerializer): Used to retrieve Sdg """ + projects = serializers.StringRelatedField(many=True) + class Meta: model = Sdg fields = ( @@ -316,6 +321,7 @@ class Meta: "name", "description", "image", + "projects", ) read_only_fields = ( "uuid",