You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, today I tried to move some our signals to the hooks and realised that if column was added into model init then it is shown as not changed.
Ex:
class Reservation(DirtyFieldsMixin, LifecycleModelMixin, models.Model):
...
In [15]: r = Reservation(edit_comment='test')
In [16]: r.has_changed('edit_comment')
Out[16]: False
In [17]: r.get_dirty_fields(check_relationship=True, verbose=True).get('edit_comment')
Out[17]: {'saved': None, 'current': 'test'}
In [18]: r = Reservation()
In [19]: r.edit_comment = 'test'
In [20]: r.has_changed('edit_comment')
Out[20]: True
So, if column is changed AFTER init - it is shown as changed, if into init - not.
Is it possible to cover this case too?
The text was updated successfully, but these errors were encountered:
Hello, today I tried to move some our signals to the hooks and realised that if column was added into model init then it is shown as not changed.
Ex:
So, if column is changed AFTER init - it is shown as changed, if into init - not.
Is it possible to cover this case too?
The text was updated successfully, but these errors were encountered: