Non-primitive type (object) defaults are shared between instances #154
If you use any non-primitive type as a default and create a model so that the default is used (i.e. not specifying the field in the serialized data) then you will end up having the same instance across all the instances (that were initized with the default). Now, in hindshight it's not surprising, because this is what happens when you have such a default for a function parameter, but the documentation is misleading as it contains an example suggesting you could do this:
While if now you create two users:
But at least the documentation should be fixed.
The text was updated successfully, but these errors were encountered: