core(XMLUI): empty options in ListWidget now just show a warning message, no more assert
This commit is contained in:
parent
a2ba38c6da
commit
fa6e44507c
1 changed files with 2 additions and 1 deletions
|
|
@ -608,7 +608,8 @@ class ListWidget(InputWidget):
|
|||
if style is None:
|
||||
style = set()
|
||||
styles = set(style)
|
||||
assert options
|
||||
if not options:
|
||||
warning(_('empty "options" list'))
|
||||
if not styles.issubset(['multi']):
|
||||
raise exceptions.DataError(_("invalid styles"))
|
||||
super(ListWidget, self).__init__(xmlui, name, parent)
|
||||
|
|
|
|||
Loading…
Reference in a new issue