django-lifecycle icon indicating copy to clipboard operation
django-lifecycle copied to clipboard

refresh_from_db doesn't update the initial state

Open partizaans opened this issue 9 months ago • 1 comments

Hi! When calling refresh_from_db() on a model instance, the values are reloaded from the database. However, the _initial_state stored on a LifeCycleModel instance is not recalculated. If the maintainers consider this a bug, I can provide a fix by overriding the refresh_from_db method in the library Mixin.

partizaans avatar May 07 '24 07:05 partizaans

That makes sense to me

EnriqueSoria avatar May 10 '24 06:05 EnriqueSoria