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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29871, comment 7

    v1 v2  
    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.
    2525
    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.
     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`.
    2727
    2828Something 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