Code

Opened 7 years ago

Closed 7 years ago

#5573 closed (duplicate)

"save" override does not work when model uses edit_inline

Reported by: Beau Gunderson <beau@…> Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: edit_inline
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Current behavior:

  1. Create model a
  2. Create model b with ForeignKey relationship to a
  3. Create a save() override in model b
  4. Verify that the save() override is called when a new b instance is created with the admin interface
  5. Change model b's ForeignKey relationship to include 'edit_inline=models.TABULAR' (or models.STACKED)
  6. Verify that the save() override is not called when creating a new b from model a's admin page

Expected behavior:

Step 6 should still call the save() override defined in model b.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Beau Gunderson <beau@…>

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

It looks like WikiFormatting is also broken. Here's the list again for better readability:

1. Create model a 
2. Create model b with ForeignKey relationship to a 
3. Create a save() override in model b 
4. Verify that the save() override is called when a new b instance is created with the admin interface 
5. Change model b's ForeignKey? relationship to include 'edit_inline=models.TABULAR' (or models.STACKED) 
6. Verify that the save() override is not called when creating a new b from model a's admin page

comment:2 Changed 7 years ago by ubernostrum

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

Duplicate of #2666. Please search the ticket tracker before filing new tickets.

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.