Author: phd
Date: 2010-04-20 11:40:16 -0600 (Tue, 20 Apr 2010)
New Revision: 4179
Modified:
SQLObject/branches/0.12/docs/News.txt
SQLObject/branches/0.12/sqlobject/main.py
Log:
Bugs were fixed in calling from_python().
Modified: SQLObject/branches/0.12/docs/News.txt
===================================================================
--- SQLObject/branches/0.12/docs/News.txt 2010-04-20 17:25:19 UTC (rev 4178)
+++ SQLObject/branches/0.12/docs/News.txt 2010-04-20 17:40:16 UTC (rev 4179)
@@ -10,7 +10,7 @@
SQLObject 0.12.4
================
-* A bug was fixed in calling from_python().
+* Bugs were fixed in calling from_python().
* A bugfix was ported from `SQLObject 0.11.6`_.
Modified: SQLObject/branches/0.12/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/main.py 2010-04-20 17:25:19 UTC (rev 4178)
+++ SQLObject/branches/0.12/sqlobject/main.py 2010-04-20 17:40:16 UTC (rev 4179)
@@ -1317,7 +1317,7 @@
for n, v in zip(name, value):
from_python = getattr(cls, '_SO_from_python_' + n)
if from_python:
- v = from_python(v, cls)
+ v = from_python(v, sqlbuilder.SQLObjectState(cls))
new_value.append(v)
condition = sqlbuilder.AND(*[getattr(cls.q, n)==v for n,v in zip(name, new_value)])
return (connection or cls._connection)._SO_selectOneAlt(
|