def to_python(self, value):
        try:
            issue_pk = int(value)
        except __HOLE__:
            raise ValidationError(self.error_messages['invalid_choice'])
        try:
            return jm_models.Issue.objects.get(pk=issue_pk)
        except jm_models.Issue.DoesNotExist:
            raise ValidationError(self.error_messages['invalid_choice'])
dataset/ETHPy150Open scieloorg/scielo-manager/scielomanager/export/forms.py/BlidModelChoiceField.to_python