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

[FIX] website_event_track_online: display only tracks with a date in agenda

Otherwise you may have a crash when computing time slots and date-based
information.

Related to testing of EventOnline
Task ID-2314778
Fwd port of PR #55625
PR #55642
parent 4d83844b
Branches
Tags
No related merge requests found
......@@ -18,7 +18,7 @@ from odoo.tools.translate import _
class EventTrackOnlineController(WebsiteEventTrackController):
def _event_agenda_get_tracks(self, event):
tracks_sudo = event.sudo().track_ids
tracks_sudo = event.sudo().track_ids.filtered(lambda track: track.date)
if not request.env.user.has_group('event.group_event_manager'):
tracks_sudo = tracks_sudo.filtered(lambda track: track.is_published or track.stage_id.is_accepted)
return tracks_sudo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment