def check_data(self): pk = self.config_entry.get('id') if pk is not None: # Detail slide. if not Assignment.objects.filter(pk=pk).exists(): raise ProjectorException('Election does not exist.') poll_id = self.config_entry.get('poll') if poll_id is not None: # Poll slide. if not AssignmentPoll.objects.filter(pk=poll_id).exists(): raise ProjectorException('Poll does not exist.')
def check_data(self): try: Mediafile.objects.get(pk=self.config_entry.get('id')) except Mediafile.DoesNotExist: raise ProjectorException('File does not exist.')
def check_data(self): if not AssignmentPoll.objects.filter( pk=self.config_entry.get('id')).exists(): raise ProjectorException('AssignmentPoll does not exist.')
def check_data(self): if self.config_entry.get('message') is None: raise ProjectorException('No message given.')
def check_data(self): pk = self.config_entry.get('id') if pk is not None: # Detail slide. if not Motion.objects.filter(pk=pk).exists(): raise ProjectorException('Motion does not exist.')
def check_data(self): pk = self.config_entry.get('id') if pk is None: raise ProjectorException('Id must not be None.') if not Item.objects.filter(pk=pk).exists(): raise ProjectorException('Item does not exist.')
def check_data(self): pk = self.config_entry.get('id') if pk is not None: # Children slide. if not Item.objects.filter(pk=pk).exists(): raise ProjectorException('Item does not exist.')