EXECUTE PROCEDURE events.check_timetable_consistency('timetable_entry'); """.format(target.fullname) DDL(sql).execute(conn) @listens_for(TimetableEntry.session_block, 'set') def _set_session_block(target, value, *unused): target.type = TimetableEntryType.SESSION_BLOCK @listens_for(TimetableEntry.contribution, 'set') def _set_contribution(target, value, *unused): target.type = TimetableEntryType.CONTRIBUTION @listens_for(TimetableEntry.break_, 'set') def _set_break(target, value, *unused): target.type = TimetableEntryType.BREAK @listens_for(TimetableEntry.start_dt, 'set') def _set_start_dt(target, value, oldvalue, *unused): from indico.modules.events.util import register_time_change if oldvalue in (NEVER_SET, NO_VALUE): return if value != oldvalue and target.object is not None: register_time_change(target) populate_one_to_one_backrefs(TimetableEntry, 'session_block', 'contribution', 'break_')
""".format(target.fullname) DDL(sql).execute(conn) @listens_for(TimetableEntry.session_block, 'set') def _set_session_block(target, value, *unused): target.type = TimetableEntryType.SESSION_BLOCK @listens_for(TimetableEntry.contribution, 'set') def _set_contribution(target, value, *unused): target.type = TimetableEntryType.CONTRIBUTION @listens_for(TimetableEntry.break_, 'set') def _set_break(target, value, *unused): target.type = TimetableEntryType.BREAK @listens_for(TimetableEntry.start_dt, 'set') def _set_start_dt(target, value, oldvalue, *unused): from indico.modules.events.util import register_time_change if oldvalue in (NEVER_SET, NO_VALUE): return if value != oldvalue and target.object is not None: register_time_change(target) populate_one_to_one_backrefs(TimetableEntry, 'session_block', 'contribution', 'break_')
) DDL(sql).execute(conn) @listens_for(TimetableEntry.session_block, "set") def _set_session_block(target, value, *unused): target.type = TimetableEntryType.SESSION_BLOCK @listens_for(TimetableEntry.contribution, "set") def _set_contribution(target, value, *unused): target.type = TimetableEntryType.CONTRIBUTION @listens_for(TimetableEntry.break_, "set") def _set_break(target, value, *unused): target.type = TimetableEntryType.BREAK @listens_for(TimetableEntry.start_dt, "set") def _set_start_dt(target, value, oldvalue, *unused): from indico.modules.events.util import register_time_change if oldvalue in (NEVER_SET, NO_VALUE): return if value != oldvalue and target.object is not None: register_time_change(target) populate_one_to_one_backrefs(TimetableEntry, "session_block", "contribution", "break_")