Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#267 closed defect (fixed)

admin redirect when "save and continue editing" uses object.id

Reported by: hugo <gb@…> Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using the "save and continue editing" call, the code makes use of a 'id' attribute in line 769:

return HttpResponseRedirect(post_url_continue % new_object.id)

If the model doesn't have an 'id' attribute but uses primary_key=True on some field, this doesn't work. Either disable the "save and continue editing" button on models without a 'id' attribute or use the pk_name field.

Change History (3)

comment:1 by Adrian Holovaty, 19 years ago

Status: newassigned

comment:2 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: assignedclosed

(In [400]) Fixed #267 -- "Save and continue editing" no longer assumes object has an ID field. Thanks, Hugo

comment:3 by (none), 18 years ago

milestone: Version 1.0

Milestone Version 1.0 deleted

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