From 58af35c976c12e496e9f36e2c3c53e63a4f68b4c Mon Sep 17 00:00:00 2001 From: Bruno Amaral Date: Wed, 23 Nov 2022 15:31:07 +0000 Subject: [PATCH] include takeaways in article json output --- django/api/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/api/serializers.py b/django/api/serializers.py index 42aa01ff..71242a82 100644 --- a/django/api/serializers.py +++ b/django/api/serializers.py @@ -8,8 +8,8 @@ class ArticleSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Articles depth = 1 - fields = ['article_id','title','summary','link','published_date','source','publisher','container_title','authors','relevant','ml_prediction_gnb','ml_prediction_lr','discovery_date','noun_phrases','doi','access'] - read_only_fields = ('discovery_date','ml_prediction_gnb','ml_prediction_lr','noun_phrases') + fields = ['article_id','title','summary','link','published_date','source','publisher','container_title','authors','relevant','ml_prediction_gnb','ml_prediction_lr','discovery_date','noun_phrases','doi','access','takeaways'] + read_only_fields = ('discovery_date','ml_prediction_gnb','ml_prediction_lr','noun_phrases','takeaways') class TrialSerializer(serializers.HyperlinkedModelSerializer): source = serializers.SlugRelatedField(many=False, read_only=True, slug_field='name')