#10038 closed (fixed)
BaseModelFormSet's method save_existing_objects uses form.changed_data instead of form.has_changed()
Reported by: | karihre | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The method save_existing_objects uses form.changed_data in an if statement instead of form.has_changed() (which only does bool(self.changed_data) ) not enabling people to overload the has_changed() method for custom behavior.
The method save_new_objects in the same class uses the has_changed() method for the same purpose so I can't figure out why it is done differently in the save_existing_objects method.
I have attached a patch to fix this.
Thank you!
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | has_changed.diff added |
---|
comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
(In [10495]) Fixed #10038: make
BaseModelFormSet.save_existing_objects
useForm.has_changed()
instead of looking atchanged_data
directly. Thanks, karihre.