1👍
✅
Since your instances are not saved, the model instance returned by form.save
with commit=False
and the original unsaved object will never be equal (except you override the __eq__
method of your model to handle this):
From the docs:
The equality method is defined such that instances with the same
primary key value and the same concrete class are considered equal,
except that instances with a primary key value ofNone
aren’t equal to anything except themselves
Source:stackexchange.com