do not fail if the data source returns nothing
This commit is contained in:
parent
73eb9d70ac
commit
1c89899b90
|
@ -663,7 +663,7 @@ class ItemField(WidgetField):
|
|||
kwargs['options'] = data_sources.get_items(self.data_source)
|
||||
elif self.items:
|
||||
kwargs['options'] = self.items
|
||||
else:
|
||||
if not kwargs.get('options'):
|
||||
kwargs['options'] = [(None, '---')]
|
||||
if self.show_as_radio:
|
||||
self.widget_class = RadiobuttonsWidget
|
||||
|
|
Loading…
Reference in New Issue