[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).
This commit is contained in:
committed by
Thibault Delavallée
parent
3716a9b261
commit
654e9dd658
@@ -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 <a target="_blank" href="/slides/slide/%s">click here to view it </a>') % 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'):
|
||||
|
||||
Reference in New Issue
Block a user