Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field Node.mtime only triggered by accident for django #2934

Closed
sphuber opened this issue May 27, 2019 · 0 comments · Fixed by #2935
Closed

Field Node.mtime only triggered by accident for django #2934

sphuber opened this issue May 27, 2019 · 0 comments · Fixed by #2935

Comments

@sphuber
Copy link
Contributor

sphuber commented May 27, 2019

The ModelWrapper utility class ensures that a database model instance
is automatically saved if a model field is updated and the instance is
already stored. This prevents the implementation from having to call
save manually every time a field is updated. The Django implementation
uses the update_fields keyword of the save method, to update only
the field affected. However, this circumvents the auto_now of the
mtime field. This bug is currently not visible, because in the model
wrapper currently also always updates the node version after a model
field is updated of a stored instance. This, however, uses a normal
save and so does properly update the mtime. Once this updating of
the node version would have been removed, this bug will be revealed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant