Skip to content

Commit

Permalink
Removed authored_focused_articles from author's secondary reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs committed Jun 6, 2024
1 parent 15d5118 commit 905f463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
29 changes: 1 addition & 28 deletions etna/api/tests/expected_results/focused_article.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,34 +251,7 @@
"width": 100,
"height": 100
}
},
"authored_focused_articles": [
{
"id": FOCUSED_ID,
"title": "focused_article",
"url": "/article_index/focused_article/",
"full_url": "http://localhost/article_index/focused_article/",
"type_label": "Focus on",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 14,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-80.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-80.webp",
"width": 100,
"height": 68
}
},
"is_newly_published": true
}
]
}
}
]
}
4 changes: 1 addition & 3 deletions etna/authors/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ def author_names(self):
api_fields = [
APIField(
"authors",
serializer=DefaultPageSerializer(
required_api_fields=["image", "authored_focused_articles"], many=True
),
serializer=DefaultPageSerializer(required_api_fields=["image"], many=True),
)
]

0 comments on commit 905f463

Please sign in to comment.