rabin %!s(int64=6) %!d(string=hai) anos
pai
achega
435d0634eb
Modificáronse 1 ficheiros con 2 adicións e 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