def has_vc_rooms_attached_to_capable(event): """Check whether the event or any of its contributions and sessions has some vc room created and those are linked to a vc capable room. """ return any(vc for vc in VCRoomEventAssociation.find_for_event( event, include_hidden=True) if vc.link_object.room is not None and vc.link_object.room in get_vc_capable_rooms())
def has_vc_rooms(event): """ Check whether the event or any of its contributions and sessions has some vc room created. """ return any( VCRoomEventAssociation.find_for_event(event, include_hidden=True))
def _clone_vc_rooms(self, new_event): for old_event_vc_room in self.old_event.all_vc_room_associations: link_object = None if old_event_vc_room.link_type == VCRoomLinkType.event: link_object = new_event elif old_event_vc_room.link_type == VCRoomLinkType.contribution and self._contrib_map is not None: link_object = self._contrib_map[old_event_vc_room.link_object] elif old_event_vc_room.link_type == VCRoomLinkType.block and self._session_block_map is not None: link_object = self._session_block_map[old_event_vc_room.link_object] if link_object is None: continue event_vc_room = VCRoomEventAssociation(show=old_event_vc_room.show, data=old_event_vc_room.data, link_object=link_object) old_event_vc_room.vc_room.events.append(event_vc_room)
def is_available(self): return VCRoomEventAssociation.find_for_event(self.old_event, include_hidden=True).has_rows()
def _has_content(self, event): return VCRoomEventAssociation.find_for_event( event, include_hidden=True).has_rows()
def is_available(self): return bool(VCRoomEventAssociation.find_for_event(self.old_event, include_hidden=True).count())