Beispiel #1
0
 def _process_args(self):
     RHManageTimetableBase._process_args(self)
     self.session_id = None
     if 'session_block_id' in request.args:
         self.session_id = SessionBlock.get_or_404(request.args['session_block_id']).session_id
         if self.session and self.session.id != self.session_id:
             raise BadRequest
Beispiel #2
0
    def update_data_association(self, event, vc_room, event_vc_room, data):
        contribution_id = data.pop('contribution')
        block_id = data.pop('block')
        link_type = VCRoomLinkType[data.pop('linking')]

        if link_type == VCRoomLinkType.event:
            event_vc_room.link_object = event
        elif link_type == VCRoomLinkType.contribution:
            event_vc_room.link_object = Contribution.get_or_404(contribution_id)
        elif link_type == VCRoomLinkType.block:
            event_vc_room.link_object = SessionBlock.get_or_404(block_id)
        event_vc_room.vc_room = vc_room
        event_vc_room.show = data.pop('show')
        if event_vc_room.data is None:
            event_vc_room.data = {}
Beispiel #3
0
 def _process_args(self):
     RHManageSessionBase._process_args(self)
     self.session_block = SessionBlock.get_or_404(
         request.view_args['block_id'])