-
Notifications
You must be signed in to change notification settings - Fork 17
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
Link to people instead of ministers #1100
Conversation
@@ -54,6 +54,7 @@ def emphasised_organisations | |||
|
|||
def link_for_type(type, link) | |||
return link_for_world_location(link) if type == "world_locations" | |||
return unless link["base_path"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a reject outside of the map, instead of having to do a compact?
Ministers is now deprecated [1] as it serves the same purpose as people links and these contain the same data. This allows widening up to links to people with other role appointments. As people can not have a base_path this also removes links that don't have pages. [1]: https://github.com/alphagov/govuk-content-schemas/blob/76fe9441a2b9ec6f030735f012347dbe8eb6e331/formats/news_article.jsonnet#L47
This namespaces the DummyContentItem class inside the ContentItemShareableTest class. This is done so that it doesn't use the global namesapce of DummyContentItem which restricted this pattern to only this single test (other tests that used it would break depending on load order).
@benthorner Thanks, I went for a select rather than a reject as that felt more natural, unfortunately there's an annoying extra condition for world_locations |
@kevindew fair enough, although should probably add a test to explain - I don't actually understand why. |
Added in to explain a bit of the oddity here since it could get lost in the annals of time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Trello: https://trello.com/c/3GT17tkH/211-associate-content-with-ministers-l
This is marked as not to be merged due to requiring this: alphagov/govuk-content-schemas#816
The ministers link type is now deprecated as it serves the same purpose as people links and these contain the same data. This allows widening up to link to people with other role appointments.
As people document_types don't require a base_path it also does a check that those actually have links (this is something that can affect pretty much all links so there should probably be more checks across this app - but I'm not opening up that rabbit hole just yet)