Skip to content
Snippets Groups Projects
Commit 3bdccc08 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[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.
parent 711a48aa
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment