|
@@ -49,10 +49,7 @@ class LeDataSourceSQL(DummyDatasource):
|
49
|
49
|
if cur.execute(insert(self.datasource_utils.objects_table_name, object_datas)) != 1:
|
50
|
50
|
raise RuntimeError('SQL error')
|
51
|
51
|
|
52
|
|
- if cur.execute('SELECT last_insert_id() as lodel_id') != 1:
|
53
|
|
- raise RuntimeError('SQL error')
|
54
|
|
-
|
55
|
|
- lodel_id, = cur.fetchone()
|
|
52
|
+ lodel_id = cur.lastrowid
|
56
|
53
|
|
57
|
54
|
datas[self.datasource_utils.field_lodel_id] = lodel_id
|
58
|
55
|
query_table_name = self.datasource_utils.get_table_name_from_class(leclass.__name__)
|