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

feat: add on_update to the field #1273

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Conversation

vvanglro
Copy link

This is a refinement of the #532.

Copy link

codspeed-hq bot commented Feb 27, 2024

CodSpeed Performance Report

Merging #1273 will degrade performances by 24.44%

Comparing vvanglro:pr532 (20e90ed) with master (3a206dd)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 82 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master vvanglro:pr532 Change
test_get_all_with_related_models[10] 68.2 ms 60.6 ms +12.49%
test_get_or_none[250] 10 ms 13.2 ms -24.44%

for k, v in self_fields.items()
if k in _columns or k in onupdate_fields
}
if not kwargs and not _columns:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all are null here, the update is based on user-modified attributes on the instance, with user-modified attributes taking precedence over on_update.

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

Successfully merging this pull request may close these issues.

None yet

3 participants