From d998c29ae8ad3a0fe8826536f0b24ca7e1270afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 16 Apr 2020 10:09:25 +0000 Subject: [PATCH] [FIX] website_slides: fix upload without category This commits fixes 6d9b367a79d09d3d7a9dde890ca651aa09b93987 that fixed 0a980d4be6300fbc888dcc9daf760a48c1b0ec32 that fixed dc9fa6e2166ad803c91ca4f3e3e17b8065eeee82 . Amazing. --- addons/website_slides/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index 4c98b0bca94..e6b71cc9ff2 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -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":