[Answer]-Cannot convert datetime.timedelta() to Decimal django

1👍

It seems you’re trying to save a timedelta object as a Decimal. This is not possible without stating how the Decimal should interpret the object. I guess you will want to do something like fm.my_decimal_field = my_time_delta_object.total_seconds().

Leave a comment