id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 9663,save_as with inlines is broken after changeset 9297,Andreas Pelme,nobody,"The save_as functionality fails after revision [9297] / [9298], when using inlines. I have attached a patch with a updated admin_views test to include CHILD_set-N-PARENT for the ordinary change_form edit test, and I also added a test for save_as in the same test. The test succeeds for revisions < [9297], since it simply does not care about the FK field. It might be suitable for better tests for the formsets themselves, but I am not quite sure how to test them properly. [http://code.djangoproject.com/ticket/8882#comment:15 A comment] in #8882 mentions this bug too (#8882 is the ticket that r9297 fixed) If you like to test this manually, outside of the testsuite, I have also attached a test project with a sqlite database which can be used to test the bug right away: 0. Admin login: test / test 1. Open the existing ""Parent""-object (change form) and hit ""Save as new"" without changing any fields. 2. The first error is ""Please correct the errors below."" 3. If you hit ""Save"" again, a KeyError will be raised and unhandled. The unittest in the patch does *NOT* test for the KeyError-exception, since I am not sure if that is the proper thing to do here, or if that is related to this issue at all. This bug affects both the 1.0.X branch and trunk.",,closed,contrib.admin,dev,,duplicate,,,Unreviewed,0,0,0,0,0,0