Django

Code

Ticket #7212 (closed: fixed)

Opened 2 months ago

Last modified 2 months ago

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

Reported by: Gulopine Assigned to: Gulopine
Milestone: Component: Database wrapper
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation:
Needs tests: Patch needs improvement:

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

save_base.alters_data.diff (0.5 kB) - added by Gulopine on 05/10/08 09:57:34.
Added alter_data to Model.save_base()

Change History

05/10/08 09:57:34 changed by Gulopine

  • attachment save_base.alters_data.diff added.

Added alter_data to Model.save_base()

05/13/08 09:56:48 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #7212 (save_base() alters data, and can be called from templates)




Change Properties
Action