From baf7252b9d65eaa9f3866a483400136a5a2ead7a Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Fri, 25 Jun 2021 17:56:10 +0200 Subject: [PATCH] LiveSync: Correctly register timetable entry changes Triggering a change for the event is useless, but in case of scheduling or unscheduling contributions (in conferences) we need to record this change in order to update their time. --- livesync/indico_livesync/handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/livesync/indico_livesync/handler.py b/livesync/indico_livesync/handler.py index 054a440..2a78f7b 100644 --- a/livesync/indico_livesync/handler.py +++ b/livesync/indico_livesync/handler.py @@ -22,6 +22,7 @@ from indico.modules.events.contributions.models.subcontributions import SubContr from indico.modules.events.notes.models.notes import EventNote from indico.modules.events.sessions import Session from indico.modules.events.sessions.models.blocks import SessionBlock +from indico.modules.events.timetable.models.entries import TimetableEntryType from indico_livesync.models.queue import ChangeType, LiveSyncQueueEntry from indico_livesync.util import get_excluded_categories, obj_ref @@ -139,7 +140,8 @@ def _location_changed(sender, obj, **kwargs): def _timetable_changed(entry, **kwargs): - _register_change(entry.event, ChangeType.data_changed) + if entry.type == TimetableEntryType.CONTRIBUTION: + _register_change(entry.object, ChangeType.data_changed) def _category_protection_changed(sender, obj, mode, old_mode, **kwargs):