[SQL-CVS] SQLObject/SQLObject SQLObject.py,1.49,1.50
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <ian...@us...> - 2003-08-01 01:19:38
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject In directory sc8-pr-cvs1:/tmp/cvs-serv30854/SQLObject Modified Files: SQLObject.py Log Message: Added test in addNeedSet so we won't re-set an already set class (which causes an error for obscure reasons). Index: SQLObject.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** SQLObject.py 18 Jul 2003 03:15:50 -0000 1.49 --- SQLObject.py 1 Aug 2003 01:19:34 -0000 1.50 *************** *** 100,104 **** cls = findClass(setCls, registry=registry) if callable(getattr(obj, attr, None)): ! getattr(obj, attr)(cls) else: setattr(obj, attr, cls) --- 100,107 ---- cls = findClass(setCls, registry=registry) if callable(getattr(obj, attr, None)): ! if not isinstance(getattr(obj, attr), type): ! # Otherwise we got a class, which means we probably ! # already set this column. ! getattr(obj, attr)(cls) else: setattr(obj, attr, cls) |