misc: don't crash on missing language code (#21252)
This commit is contained in:
parent
c932aea280
commit
a1dc28536a
|
@ -70,7 +70,8 @@ class PickerWidgetMixin(object):
|
|||
attrs = {'readonly': ''}
|
||||
|
||||
self.options = options
|
||||
self.options['language'] = get_language().split('-')[0]
|
||||
if get_language():
|
||||
self.options['language'] = get_language().split('-')[0]
|
||||
|
||||
# We're not doing localisation, get the Javascript date format provided by the user,
|
||||
# with a default, and convert it to a Python data format for later string parsing
|
||||
|
|
Loading…
Reference in New Issue