示例#1
0
 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)
示例#2
0
文件: manage.py 项目: ipaste/indico
 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)
示例#3
0
 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)
示例#4
0
 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)
示例#5
0
 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)
示例#6
0
文件: legacy.py 项目: florv/indico
 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)