-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do some validation on filters before updating the map
Highlight empty filters and also prevent the map updating if there are empty filters. Also ignore empty filters at the back end to avoid 500 errors Fixes #328
- Loading branch information
Showing
4 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,6 +124,14 @@ def setUp(self): | |
self.u = User.objects.create(username="[email protected]") | ||
self.client.force_login(self.u) | ||
|
||
def test_explore_json_page_null_value(self): | ||
url = reverse("explore_json") | ||
response = self.client.get(url + "?mp_last_elected__year__lt=") | ||
self.assertEqual(response.status_code, 200) | ||
self.assertContains(response, "South Borsetshire") | ||
self.assertContains(response, "Borsetshire West") | ||
self.assertContains(response, "Borsetshire East") | ||
|
||
def test_explore_json_page_year_lt(self): | ||
url = reverse("explore_json") | ||
response = self.client.get(url + "?mp_last_elected__year__lt=2019") | ||
|