Replace nested ternery with if/elsif block
Merge pull request #245 from alphagov/tidy

Replace nested ternery with if/elsif block