|
@@ -206,7 +206,13 @@ def format_date_by_locale(date, locale_string):
|
206
|
206
|
if locale_string == 'all':
|
207
|
207
|
locale_string = settings['ui']['default_locale'] or 'en_US'
|
208
|
208
|
|
209
|
|
- return format_date(date, locale=locale_string)
|
|
209
|
+ # to avoid crashing if locale is not supported by babel
|
|
210
|
+ try:
|
|
211
|
+ formatted_date = format_date(date, locale=locale_string)
|
|
212
|
+ except:
|
|
213
|
+ formatted_date = format_date(date, "YYYY-MM-dd")
|
|
214
|
+
|
|
215
|
+ return formatted_date
|
210
|
216
|
|
211
|
217
|
|
212
|
218
|
def dict_subset(d, properties):
|