Patches item #1370261, was opened at 2005-11-30 12:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1370261&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Luke Opperman (luke_opperman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for plain/nonplain setters during create
Initial Comment:
Using rev 1326 (probably long before this, found it
during attempting to
migrate an 0.5-based app to svn version). I've attached
a simple test case,
the problem is in main.SQLObject.set. Flow:
1. set plain setters
2. set nonplain setters (in this case, a non-db column)
2a. in the problem scenario, these then set some db columns
2b. which in _SO_setValue add their correct values to
_SO_createValues
3. set then updates _SO_createValues with the original
dict, which has the
default values for the db columns set by the nonplain.
Not sure if there's an intentional reason to delay
populating _SO_createValues,
by moving self._SO_createValues.update(kw) between
steps 1 and 2 the tests pass for me.
This is that simple patch and the associated test.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1370261&group_id=74338
|