Open itzNikshit opened 7 months ago
auto_now it's default value for the field. You shouldn't pass this field to update_fields, if you want automatic updating
auto_now it's default value for the field. You shouldn't pass this field to update_fields, if you want automatic updating
But if I don't pass it in update_fields, the updated_at doesn't update on .save()
Hi there, I am a bit new to tortoise-orm and was playing with things where I encountered a problem where an
auto_now=True
datetimefield does not get updated if I callmodel.save(update_fields=['updated_field'])
. It only gets updated if I pass theauto_now
field inupdate_fileds
. I don't know if this was intentional or a miss or just that's how things work.