def get_db_prep_value(self, value, connection, prepared=False):
        if not prepared:
            value = self.get_prep_value(value)
        return value.state.name
Convert a value to DB storage.
dataset/ETHPy150Open rbarrois/django_xworkflows/django_xworkflows/models.py/StateField.get_db_prep_value