From 654e9dd658fa6efa427ff447db5dc7dfe9d0de1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Warnon?= Date: Tue, 6 Aug 2019 11:52:19 +0000 Subject: [PATCH] [FIX] website_slides: fix error message display on upload When uploading twice the same video for a channel, the error message displayed unhandled html. We removed the html to avoid having to use $el.html() for better safety (and it should not happen often anyway). --- addons/website_slides/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 7d7eee4fb8e..85aeab3b224 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -764,7 +764,7 @@ class WebsiteSlides(WebsiteProfile): return preview existing_slide = Slide.search([('channel_id', '=', int(data['channel_id'])), ('document_id', '=', document_id)], limit=1) if existing_slide: - preview['error'] = _('This video already exists in this channel click here to view it ') % existing_slide.id + preview['error'] = _('This video already exists in this channel on the following slide: %s') % existing_slide.name return preview values = Slide._parse_document_url(data['url'], only_preview_fields=True) if values.get('error'):