After r10003, Model.save() raises an error in Oracle if the model includes a TimeField. The reason appears to be that save_base calls TimeField.get_db_prep_save prior to passing the value on to the queryset, which calls TimeField.to_python -- returning a time instance -- and then passes the result to the backend, where the time instance is converted to a datetime. Later, UpdateQuery.add_update_fields calls TimeField.get_db_prep_save again, passing in the datetime, which to_python doesn't know how to handle.
Should TimeField.to_python be able to handle datetime values, by simply returning datetime.time()? I'll note that DateField already has the equivalent logic, so it would at least be more consistent. There may also be an argument for removing the seemingly redundant get_db_prep_save call from save_base. Any thoughts on that? Thanks, Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---