Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 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@…, isometry 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 kmike 5 years ago.
9651-r10336.diff (3.5 KB) - added by Mnewman 5 years ago.
Updated patch to r10336

Download all attachments as: .zip

Change History (19)

comment:1 Changed 5 years ago by yamad

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by kmtracey

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

comment:3 Changed 5 years ago by peritus

  • Cc andreas@… added

comment:4 in reply to: ↑ description Changed 5 years ago by stephaner

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 5 years ago by kmtracey

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 5 years ago by kmike84@…

  • Cc kmike84@… added
  • Triage Stage changed from Unreviewed to Accepted

comment:7 Changed 5 years ago by anonymous

  • Cc smathieson@… added

Changed 5 years ago by kmike

comment:8 Changed 5 years ago by kmike

  • 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 5 years ago by stephaner

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

comment:10 Changed 5 years ago by Ciantic

  • Cc ciantic@… added

comment:11 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:12 Changed 5 years ago by kmike

Can somebody with commit rights review this ticket?

comment:13 Changed 5 years ago by isometry

  • Cc isometry added
  • milestone set to 1.1

comment:14 Changed 5 years ago by Mnewman

  • Triage Stage changed from Accepted to Ready 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 5 years ago by Mnewman

Updated patch to r10336

comment:15 Changed 5 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:16 Changed 5 years ago by kmtracey

(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 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.