Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TypeError in CountryFilter.choices()
When no country is selected, self.used_parameters.get(self.field.name) will return None. This raises a TypeError when CountryFilter.choices() tries to check whether a specific country choice is currently selected. Avoid this by checking that the parameter is not empty similarly to how Django's built-in admin.filters.RelatedFieldListFilter checks for this. Fixes: 04662d1 ("Support Django 5.0")
- Loading branch information