Skip to content
Snippets Groups Projects
Commit 654e9dd6 authored by Aurélien Warnon's avatar Aurélien Warnon Committed by Thibault Delavallée
Browse files

[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).
parent 3716a9b2
Branches
Tags
No related merge requests found
......@@ -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'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment