summaryrefslogtreecommitdiff
path: root/addons/website_event/controllers/main.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-28 13:24:14 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-28 13:24:14 +0200
commit99bf9e4563d8c17be1635fc09d336b693b5ba1a1 (patch)
treeeb04654ef5ef384319aa4292bac122b18445689f /addons/website_event/controllers/main.py
parent6b410fc954ccd85e7aea2c9fa86c6f2097474883 (diff)
parent89df681b458df5b2fd21b738409a90dd53e33c9a (diff)
[MERGE] forward port branch saas-16 up to 89df681b458
Diffstat (limited to 'addons/website_event/controllers/main.py')
-rw-r--r--addons/website_event/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py
index 28ac0c17a8a..4f5a6516720 100644
--- a/addons/website_event/controllers/main.py
+++ b/addons/website_event/controllers/main.py
@@ -197,7 +197,7 @@ class WebsiteEventController(http.Controller):
def get_formated_date(self, event):
start_date = fields.Datetime.from_string(event.date_begin).date()
end_date = fields.Datetime.from_string(event.date_end).date()
- month = babel.dates.get_month_names('abbreviated', locale=event.env.context.get('lang', 'en_US'))[start_date.month]
+ month = babel.dates.get_month_names('abbreviated', locale=event.env.context.get('lang') or 'en_US')[start_date.month]
return ('%s %s%s') % (month, start_date.strftime("%e"), (end_date != start_date and ("-" + end_date.strftime("%e")) or ""))
@http.route('/event/get_country_event_list', type='json', auth='public', website=True)