Opened 18 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)
Change History (2)
by , 18 years ago
| Attachment: | save_base.alters_data.diff added |
|---|
comment:1 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Added
alter_datatoModel.save_base()