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')