Fixes #1765: Improved rendering of null options for model choice fields in filter forms

This commit is contained in:
Jeremy Stretch
2017-12-26 12:08:22 -05:00
parent 6bd814016b
commit d63c9965b4
7 changed files with 53 additions and 45 deletions

View File

@@ -81,7 +81,7 @@ class TenantFilterForm(BootstrapMixin, CustomFieldFilterForm):
group = FilterChoiceField(
queryset=TenantGroup.objects.annotate(filter_count=Count('tenants')),
to_field_name='slug',
null_option=(0, 'None')
null_label='-- None --'
)