Roundup Tracker - Issues

Message5894

Author schlatterbeck
Recipients richard, rouilj, schlatterbeck, stefan
Date 2016-08-16.13:40:25
Message-id <1471354827.16.0.401892448948.issue1408570@psf.upfronthosting.co.za>
In-reply-to
I've now traced this a little further, it turns out that
- Form values *are* preserved internally. The whole form is present in
  the cgi client used to render an issue
- But: The database wins. Only if a field is empty in the database
  (return None but for Number a 0 will probably also be overridden) the
  form will override this value.

Code is in cgi/templating.py notably the HTMLProperty class (from which
all the special classes like DateHTMLProperty inherit) does a lookup of
the form value only if it is passed an empty value in the constructor.

This in turn is called from __getitem__ of _HTMLItem which looks up the
value from the database.

Now to fix this we need some way to pass information to HTMLProperty to
indicate that it should prefer the form contents over the database contents.

I don't know if this would be a security risk to *always* prefer the
form values...
History
Date User Action Args
2016-08-16 13:40:27schlatterbecksetmessageid: <1471354827.16.0.401892448948.issue1408570@psf.upfronthosting.co.za>
2016-08-16 13:40:27schlatterbecksetrecipients: + schlatterbeck, richard, stefan, rouilj
2016-08-16 13:40:27schlatterbecklinkissue1408570 messages
2016-08-16 13:40:26schlatterbeckcreate