-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
There have been two PRs (#152 and #194) suggesting some sort of change to the current behavior which is that:
a) Fields with auto_now=True do not appear as dirty - they won't appear in .get_dirty_fields()
b) And so by extension .save_dirtyfields() doesn't include them in update_fields so they are not updated by this method.
Some options we have are:
- Make no changes and document behavior. Users can override
save()/save_dirty_fields()/get_dirty_fields()if they need something else. - Keep (a) the same but make some change to
save_dirty_fields. E.g. my suggestion here - Make
auto_now=Truefields appear as dirty sosave_dirtyfields()will update them.
There was a similar issue and discussion in Django here: https://code.djangoproject.com/ticket/22981 where the resolution was to make no changes.
Metadata
Metadata
Assignees
Labels
No labels