Skip to content

Commit

Permalink
Merge pull request #289 from brunoamaral/add-takeaways-to-api
Browse files Browse the repository at this point in the history
include takeaways in article json output
  • Loading branch information
brunoamaral authored Nov 23, 2022
2 parents 79b20ee + 58af35c commit a1e3535
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit a1e3535

Please sign in to comment.