netzkolchose / django-computedfields

Provides autogenerated autoupdated database fields for model methods.
MIT License
94 stars 14 forks source link

possible desync state with update_fields #90

Closed jerch closed 2 years ago

jerch commented 2 years ago

If a computed field cf depends on a local concrete field f that got changed in python, there is one desync state uncovered with update_fields:

This needs at least a warning in the docs about that weird update_fields usage.

Another way to deal with that would be to extend updated fields also in the computed --> source field direction. Not sure if thats the wanted behavior, there might be reason, why the user left out f in the first place.