|
@@ -423,6 +423,12 @@ class LeDataSourceSQL(DummyDatasource):
|
423
|
423
|
cur.execute('SELECT last_insert_id()')
|
424
|
424
|
relation_id, = cur.fetchone()
|
425
|
425
|
|
|
426
|
+ if nature == 'parent':
|
|
427
|
+ parent_superiors = lesup.superiors()
|
|
428
|
+ for superior in parent_superiors:
|
|
429
|
+ depth = depth - 1 if depth is not None else 1
|
|
430
|
+ self.add_relation(lesup=superior.lodel_id, lesub=lesub.lodel_id, nature='parent', depth=depth, rank=rank)
|
|
431
|
+
|
426
|
432
|
return relation_id
|
427
|
433
|
|
428
|
434
|
## @brief Fetch a superiors list ordered by depth for a LeType
|