Changes between Initial Version and Version 1 of Ticket #29871, comment 7


Ignore:
Timestamp:
Oct 22, 2018, 1:58:06 PM (6 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29871, comment 7

    initial v1  
    2323
    2424This 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
     26FWIW 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.
     27
     28Something 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.
Back to Top