rabin 4 years ago
parent
commit
435d0634eb
1 changed files with 2 additions and 0 deletions
  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