def to_internal_value(self, data):
        try:
            return self.get_queryset().get(**{self.slug_field: data})
        except __HOLE__:
            self.fail('does_not_exist', slug_name=self.slug_field, value=smart_text(data))
        except (TypeError, ValueError):
            self.fail('invalid')
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/relations.py/SlugRelatedField.to_internal_value