Opened 17 years ago

Closed 17 years ago

#7212 closed (fixed)

save_base() alters data, and can be called from templates

Reported by: Marty Alchin Owned by: Marty Alchin
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In [7221], save() was changed to just be a call to save_base(), making subclassing easier, but the alters_data attribute never made it onto save_base(). Since save_base() can (and usually is) called without arguments, this means that templates that receive an object can use {{ obj.save_base }} and commit to the database, when that shouldn't be allowed.

Attachments (1)

save_base.alters_data.diff (523 bytes ) - added by Marty Alchin 17 years ago.
Added alter_data to Model.save_base()

Download all attachments as: .zip

Change History (2)

by Marty Alchin, 17 years ago

Attachment: save_base.alters_data.diff added

Added alter_data to Model.save_base()

comment:1 by Gary Wilson, 17 years ago

Resolution: fixed
Status: newclosed

(In [7526]) Fixed #7212 -- Added alters_data attribute to Model.save_base method, thanks Gulopine.

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