fixed Issue 1500:MySQL driver unable to handle IntegrityError, thanks wheresgatsby
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.6-stable+timestamp.2013.05.24.08.27.55
|
Version 2.4.6-stable+timestamp.2013.05.24.08.34.18
|
||||||
|
|||||||
@@ -2522,6 +2522,9 @@ class MySQLAdapter(BaseAdapter):
|
|||||||
self.execute('select last_insert_id();')
|
self.execute('select last_insert_id();')
|
||||||
return int(self.cursor.fetchone()[0])
|
return int(self.cursor.fetchone()[0])
|
||||||
|
|
||||||
|
def integrity_error_class(self):
|
||||||
|
return self.cursor.IntegrityError
|
||||||
|
|
||||||
class PostgreSQLAdapter(BaseAdapter):
|
class PostgreSQLAdapter(BaseAdapter):
|
||||||
drivers = ('psycopg2','pg8000')
|
drivers = ('psycopg2','pg8000')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user