backoffice: ignore empty data in field filters (#38809)
This commit is contained in:
parent
e508d436ab
commit
2f85a20ed0
|
@ -713,6 +713,9 @@ def test_backoffice_item_filter(pub):
|
|||
elif i%4 == 2:
|
||||
formdata.data['4'] = 'd'
|
||||
formdata.data['4_display'] = 'd'
|
||||
else:
|
||||
formdata.data['4'] = ''
|
||||
formdata.data['4_display'] = ''
|
||||
formdata.store()
|
||||
|
||||
app = login(get_app(pub))
|
||||
|
|
|
@ -1084,7 +1084,7 @@ class FormPage(Directory):
|
|||
exploded_options[option_key] = option_label
|
||||
options = list(sorted(exploded_options.items(), key=lambda x: x[1]))
|
||||
|
||||
options = [(force_str(x), force_str(y)) for x, y in options]
|
||||
options = [(force_str(x), force_str(y)) for x, y in options if x and y]
|
||||
|
||||
return options
|
||||
|
||||
|
|
Loading…
Reference in New Issue