Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#9651 closed (fixed)

[9297] breaks save_as in inline admin forms

Reported by: yamad Owned by: nobody
Component: contrib.admin Version:
Severity: Keywords:
Cc: andreas@…, kmike84@…, smathieson@…, ciantic@…, Robin Breathe Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Changeset [9297] seems to have done something much like ticket #5828 back from newforms-admin, but only for save_as. All inline forms are required when using the "Save as New" option.

Using [9296] allows save_as to work.

Attachments (2)

patch1.diff (3.6 KB) - added by Mikhail Korobov 8 years ago.
9651-r10336.diff (3.5 KB) - added by Michael Newman 8 years ago.
Updated patch to r10336

Download all attachments as: .zip

Change History (19)

comment:1 Changed 8 years ago by yamad

comment:2 Changed 8 years ago by Karen Tracey

#9663 reports this again and provides tests to demonstrate the failure.

comment:3 Changed 8 years ago by Andreas Pelme

Cc: andreas@… added

comment:4 in reply to:  description Changed 8 years ago by Stephane Raimbault

Replying to yamad:

Using [9296] allows save_as to work.

The link doesn't seem relevant to this bug report, it links to changes about the Italian translation:

[1.0.X] Italian translation updated

comment:5 Changed 8 years ago by Karen Tracey

While it is true the fix made in r9296 has nothing to do with this problem, this ticket is reporting a problem introduced in r9297, so r9296 is the last revision that you can use that does not exhibit the problem. I believe that is all the original poster was trying to say.

comment:6 Changed 8 years ago by kmike84@…

Cc: kmike84@… added
Triage Stage: UnreviewedAccepted

comment:7 Changed 8 years ago by anonymous

Cc: smathieson@… added

Changed 8 years ago by Mikhail Korobov

Attachment: patch1.diff added

comment:8 Changed 8 years ago by Mikhail Korobov

Has patch: set

I think that when "Save as new" option is active foreign keys in inlines are still pointing to old objects and it causes the problem.
Please check the patch. Tests are from #9663.

comment:9 Changed 8 years ago by Stephane Raimbault

I've stressed your change with complex model relations and your patch works fine, great!

comment:10 Changed 8 years ago by Jari Pennanen

Cc: ciantic@… added

comment:11 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:12 Changed 8 years ago by Mikhail Korobov

Can somebody with commit rights review this ticket?

comment:13 Changed 8 years ago by Robin Breathe

Cc: Robin Breathe added
milestone: 1.1

comment:14 Changed 8 years ago by Michael Newman

Triage Stage: AcceptedReady for checkin

This patch looks good as is. Tests pass and make sense, also working on site. Just updating to current trunk and marking 'ready for checkin'

Changed 8 years ago by Michael Newman

Attachment: 9651-r10336.diff added

Updated patch to r10336

comment:15 Changed 8 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [10353]) Fixed #9651: fixed save_as with inline forms. Thanks, kmike and Mnewman.

comment:16 Changed 8 years ago by Karen Tracey

(In [10612]) [1.0.X] Fixed #9651: fixed save_as with inline forms. Thanks, kmike and Mnewman.

Backport of r10353 from trunk.

comment:17 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top