mysociety / contract-countdown

https://mysociety.github.io/contract-countdown/
0 stars 0 forks source link

Fix error raised if somebody DOES enter a valid postcode. #45

Closed alexander-griffen closed 1 year ago

alexander-griffen commented 1 year ago

When entering a valid postcode in the homepage search box, an error is raised because it searches for a council regardless of if it's already been caught as a postcode (which means that it's trying to filter based on a string, despite a list being given).

This has been fixed by just checking the type of the pc variable by the time it gets to the second clean function, which is meant for councils.