[SQL-CVS] r630 - trunk/SQLObject/sqlobject/mysql
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2005-02-21 12:49:27
|
Author: phd Date: 2005-02-21 12:49:20 +0000 (Mon, 21 Feb 2005) New Revision: 630 Modified: trunk/SQLObject/sqlobject/mysql/mysqlconnection.py Log: Applied the patch from https://sourceforge.net/tracker/index.php?func=detail&aid=1040262&group_id=74338&atid=540672 Modified: trunk/SQLObject/sqlobject/mysql/mysqlconnection.py =================================================================== --- trunk/SQLObject/sqlobject/mysql/mysqlconnection.py 2005-02-21 12:43:02 UTC (rev 629) +++ trunk/SQLObject/sqlobject/mysql/mysqlconnection.py 2005-02-21 12:49:20 UTC (rev 630) @@ -52,7 +52,10 @@ self.printDebug(conn, q, 'QueryIns') self._executeRetry(conn, c, q) if id is None: - id = c.lastrowid + try: + id = c.lastrowid + except AttributeError: + id = c.insert_id() if self.debugOutput: self.printDebug(conn, id, 'QueryIns', 'result') return id |