Changes between Version 1 and Version 2 of Ticket #29871, comment 7
- Timestamp:
- Oct 22, 2018, 1:58:42 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29871, comment 7
v1 v2 24 24 This code should make sure that setting `self.pk = None` does `self.item_ptr_id = self.id = None` for any level of concrete model inheritance. That should be enough for `save()` to create new objects from my local testing. 25 25 26 FWIW this changes passes the full test suite on SQLite so it could be a tentative patch but it kind of break the symmetry with `_get_pk` as.26 FWIW this changes passes the full test suite on SQLite so it could be a tentative patch but it kind of break the symmetry with `_get_pk`. 27 27 28 28 Something to keep in mind though is that right now `pk = None` assignment trick for object copying is neither documented or embraced by the Django documentation AFAIK.