misc: always prefer data source over manually defined items (#43689)
This commit is contained in:
parent
3646267782
commit
c71662ec46
|
@ -1461,9 +1461,7 @@ class ItemField(WidgetField):
|
|||
self.widget_class = JsonpSingleSelectWidget
|
||||
return
|
||||
|
||||
if self.items:
|
||||
kwargs['options'] = self.get_options()
|
||||
elif self.data_source:
|
||||
if self.data_source:
|
||||
items = data_sources.get_items(self.data_source,
|
||||
include_disabled=self.display_disabled_items)
|
||||
kwargs['options'] = [x[:3] for x in items if not x[-1].get('disabled')]
|
||||
|
|
Loading…
Reference in New Issue