Refactor a tiny bit of data access in views to the controller

- Spotted by @jamiecobbett in https://github.com/alphagov/transition/pull/329.