Describe the bug
In /labs when clicking in Filter without setting the "Filter by country" and "Filter by status" drop-down it returns a rails exception.
It looks like the default behaviour of both drop-downs doesn't get properly initialised. When the drop-downs are selected, even if nothing is changed, defaults are set and the filter works properly.
To Reproduce
Steps to reproduce the behaviour A:
- Go to /labs
- Select a Country from the "filter by country" country drop-down
- Do not touch / select any option in the "filter by country" nor "filter by status" drop-downs
- Click on "Filter"
- See error
To Reproduce
Steps to reproduce the behaviour B:
- Go to /labs
- Select a Country from the "filter by country" country drop-down
- Do not touch / select any option in the status drop-down
- Click on "Filter"
- See error
Expected behaviour
Drop-downs should be properly initialised with defaults
When no country is selected it should return all the labs
When no country is selected but a status is set it should filter by status only, matching all countries
When no status is selected but a country is set it should filter by country only, matching all status
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Mac OS
- Browser Chrome
- Version 84.0.4147.89
Describe the bug
In /labs when clicking in Filter without setting the "Filter by country" and "Filter by status" drop-down it returns a rails exception.
It looks like the default behaviour of both drop-downs doesn't get properly initialised. When the drop-downs are selected, even if nothing is changed, defaults are set and the filter works properly.
To Reproduce
Steps to reproduce the behaviour A:
To Reproduce
Steps to reproduce the behaviour B:
Expected behaviour
Drop-downs should be properly initialised with defaults
When no country is selected it should return all the labs
When no country is selected but a status is set it should filter by status only, matching all countries
When no status is selected but a country is set it should filter by country only, matching all status
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):