I don't know why get_db_prep_lookup() was used here - it definitely isn't meant for this kind of value conversion. Also, form's submitted value conversion to python value shouldn't depend on the used database.