[FIX] website_slides: latest courses should display all my courses
Correctly fetch courses the current user is a member of, not those he already finished at least a lesson. Commit linked to task ID 1941250 and PR #31512.
This commit is contained in:
@@ -192,7 +192,7 @@ class WebsiteSlides(WebsiteProfile):
|
||||
domain = request.website.website_domain()
|
||||
channels_all = request.env['slide.channel'].search(domain)
|
||||
if not request.env.user._is_public():
|
||||
channels_my = channels_all.filtered(lambda channel: channel.completion > 0).sorted('completion', reverse=True)[:3]
|
||||
channels_my = channels_all.filtered(lambda channel: channel.is_member).sorted('completion', reverse=True)[:3]
|
||||
else:
|
||||
channels_my = request.env['slide.channel']
|
||||
channels_popular = channels_all.sorted('total_votes', reverse=True)[:3]
|
||||
|
||||
Reference in New Issue
Block a user