<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_db_prep_value(self, value, connection, prepared=False):
 """Convert a value to DB storage. Returns the state name. """

        if not prepared:
            value = self.get_prep_value(value)
        return value.state.name