You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documenting a 'gotcha' here in case it comes in useful to somebody, and serves as a reminder of a bit of legacy we can clear up next time we work on content store.
My understanding from talking to Kevin is that the links field is legacy and should be removed. In my opinion we would then rename expanded_links to links in content-store so that it stays consistent with how we expose it in the API.
The text was updated successfully, but these errors were encountered:
This is one step towards solving #632 and avoids unnecessary confusion
over their being two fields for accessing the links.
There are only 310 content items left which have something in the
`links`:
```rb
irb(main):005:0> ContentItem.where(:links.nin => [{}, nil]).count
=> 310
```
I don't think we need to write a migration to remove this field because
as new content is presented to the content store, it'll get overwritten
anyway.
Documenting a 'gotcha' here in case it comes in useful to somebody, and serves as a reminder of a bit of legacy we can clear up next time we work on content store.
Consider this item:
It has a
links
field which is empty:item.links
=>{}
But it has
expanded_links
which contains content:item.expanded_links
=>(lots of things)
But these come through as
links
in the API (which is pretty confusing for a newcomer!):https://www.gov.uk/api/content/dispose-hazardous-waste
My understanding from talking to Kevin is that the
links
field is legacy and should be removed. In my opinion we would then renameexpanded_links
tolinks
in content-store so that it stays consistent with how we expose it in the API.The text was updated successfully, but these errors were encountered: