Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fields to support press release items #1167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/news_api_search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Feature: News API News Search
"product_type": "news_api"
}]
"""
When we get "news/search?start_date=now-10d&include_fields=headline"
When we get "news/search?start_date=now-10d&include_fields=slugline"
Then we get response code 400

Scenario: exclude fields
Expand Down
2 changes: 1 addition & 1 deletion newsroom/news_api/news/search_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NewsAPINewsService(BaseSearchService):
# set of fields that can be specified in the include_fields parameter
allowed_include_fields = {'type', 'urgency', 'priority', 'language', 'description_html', 'located', 'keywords',
'source', 'subject', 'place', 'wordcount', 'charcount', 'body_html', 'readtime',
'profile', 'service', 'genre', 'associations'}
'profile', 'service', 'genre', 'associations', 'headline', 'extra'}

default_fields = {
'_id', 'uri', 'embargoed', 'pubstatus', 'ednote', 'signal', 'copyrightnotice', 'copyrightholder',
Expand Down