def _process(self): if self.entry.type == TimetableEntryType.SESSION_BLOCK: delete_session_block(self.entry.session_block) elif self.entry.type == TimetableEntryType.CONTRIBUTION and self.event_new.type != 'conference': delete_contribution(self.entry.contribution) else: delete_timetable_entry(self.entry) return jsonify_data(flash=False)
def _process_DELETE(self): """Delete a timetable entry""" if self.entry.type == TimetableEntryType.SESSION_BLOCK: delete_session_block(self.entry.session_block) elif self.event.type != 'conference' and self.entry.type == TimetableEntryType.CONTRIBUTION: delete_contribution(self.entry.contribution) else: delete_timetable_entry(self.entry)
def _process(self): day = self.entry.start_dt.astimezone(self.entry.event.tzinfo).date() block = self.entry.parent if self.entry.type == TimetableEntryType.SESSION_BLOCK: delete_session_block(self.entry.session_block) elif self.entry.type == TimetableEntryType.CONTRIBUTION and self.event.type != 'conference': delete_contribution(self.entry.contribution) else: delete_timetable_entry(self.entry) return jsonify_data(update=serialize_day_update(self.event, day, block=block, session_=self.session), flash=False)
def _process(self): day = self.entry.start_dt.astimezone(self.entry.event_new.tzinfo).date() block = self.entry.parent if self.entry.type == TimetableEntryType.SESSION_BLOCK: delete_session_block(self.entry.session_block) elif self.entry.type == TimetableEntryType.CONTRIBUTION and self.event_new.type != 'conference': delete_contribution(self.entry.contribution) else: delete_timetable_entry(self.entry) return jsonify_data(update=serialize_day_update(self.event_new, day, block=block, session_=self.session), flash=False)