[FIX] website_event_track_session: jump to unfinished session after an ended talk
This commit adds a condition to the algorithm that redirects the track viewers to another talk when the one they looked at ended up. The next talk must be still ongoing. It avoids to redirect to a talk that started less than 10 minutes ago but that is already done. Task ID: 2344522 closes odoo/odoo#58836 X-original-commit: e047fc2c7f5d2440adce30ce81a2c10a3b133083 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Thibault Delavallée
parent
73db202930
commit
4149380de8
@@ -478,8 +478,9 @@ class Track(models.Model):
|
||||
track_candidates = track_candidates.sorted(
|
||||
lambda track:
|
||||
(track.is_published,
|
||||
track.track_start_remaining == 0 # First get the tracks that started less than 10 minutes ago
|
||||
and track.track_start_relative < (10*60),
|
||||
track.track_start_remaining == 0 # First get the tracks that started less than 10 minutes ago ...
|
||||
and track.track_start_relative < (10 * 60)
|
||||
and not track.is_track_done, # ... AND not finished
|
||||
track.track_start_remaining > 0, # Then the one that will begin later (the sooner come first)
|
||||
-1 * track.track_start_remaining,
|
||||
track.is_reminder_on,
|
||||
|
||||
Reference in New Issue
Block a user