rabin 6 tahun lalu
induk
melakukan
435d0634eb
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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