#29871: Resetting primary key for a derived object does not work -------------------------------------+------------------------------------- Reporter: Victor Porton | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: 2.1 (models, ORM) | Severity: Normal | Resolution: invalid Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Victor Porton): Replying to [comment:7 Simon Charette]: > Could you confirm that the following patch work for you when setting `self.pk = None` in `reset()`. No, the patch does not make `self.pk = None` to work! {{{ pip install django ... patch -p1 < ~/t/patch.diff cd /home/porton/Projects/test/testsave (env) testsave,0$ ./manage.py test Creating test database for alias 'default'... System check identified no issues (0 silenced). F ====================================================================== FAIL: test_f_true (test1.tests.SaveTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/porton/Projects/test/testsave/test1/tests.py", line 19, in test_f_true self.assertTrue(obj.f) AssertionError: False is not true ---------------------------------------------------------------------- Ran 1 test in 0.005s FAILED (failures=1) Destroying test database for alias 'default'... }}} -- Ticket URL: <https://code.djangoproject.com/ticket/29871#comment:8> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.26b63dc05790acf5ddf7c91ebd11f7d2%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.