def validate_options(self, value): if not self.instance: known = [] for opt_data in value: if opt_data.get('identifier'): QuestionOption.clean_identifier(self.context['event'], opt_data.get('identifier'), self.instance, known) known.append(opt_data.get('identifier')) return value
def validate_identifier(self, value): QuestionOption.clean_identifier(self.context['event'], value, self.instance) return value