[FIX] website_slides: fix upload without category

This commits fixes 6d9b367a79d09d3d7a9dde890ca651aa09b93987 that fixed 0a980d4be6300fbc888dcc9daf760a48c1b0ec32 that fixed dc9fa6e2166ad803c91ca4f3e3e17b8065eeee82 .
Amazing.
This commit is contained in:
Thibault Delavallée
2020-04-16 10:26:32 +00:00
parent afa193c02b
commit d998c29ae8
+2 -2
View File
@@ -1024,7 +1024,7 @@ class WebsiteSlides(WebsiteProfile):
# minutes to hours conversion
values['completion_time'] = int(post['duration']) / 60
category_id = False
category = False
# handle creation of new categories on the fly
if post.get('category_id'):
category_id = post['category_id'][0]
@@ -1050,7 +1050,7 @@ class WebsiteSlides(WebsiteProfile):
return {'error': _('Internal server error, please try again later or contact administrator.\nHere is the error message: %s') % e}
# ensure correct ordering by re sequencing slides in front-end (backend should be ok thanks to list view)
channel._resequence_slides(slide, category)
channel._resequence_slides(slide, force_category=category)
redirect_url = "/slides/slide/%s" % (slide.id)
if channel.channel_type == "training" and not slide.slide_type == "webpage":