rabin hace 6 años
padre
commit
435d0634eb
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      demeter/model.py

+ 2 - 0
demeter/model.py

@@ -59,6 +59,8 @@ class Model(object):
 	def lastId(self, cur):
 		if hasattr(cur, 'lastrowid'):
 			id = cur.lastrowid
+			if not id:
+				id = cur.fetchone()[0]
 		else:
 			id = cur.fetchone()[0]
 		return id