Fix gotcha when defining new provider views

UI should show the key if label is missing
This commit is contained in:
Lance Edgar 2022-03-07 17:40:48 -06:00
parent 8f4b223125
commit 9d5adf7793

View file

@ -284,7 +284,7 @@ class PoserViewView(PoserMasterView):
for topkey, topgroup in six.iteritems(view_settings): for topkey, topgroup in six.iteritems(view_settings):
for key in list(topgroup): for key in list(topgroup):
settings = topgroup[key] settings = topgroup[key]
settings = [(key, setting['label']) settings = [(key, setting.get('label', key))
for key, setting in six.iteritems(settings)] for key, setting in six.iteritems(settings)]
settings.sort(key=lambda itm: itm[1]) settings.sort(key=lambda itm: itm[1])
topgroup[key] = settings topgroup[key] = settings