def prepare_value(self, value):
        if value is None and self.required:
            choices =list(self.choices)
            if len(choices) == 1:
                value = choices[0][0]
        return super(TemplateChoiceField, self).prepare_value(value)