nanterre: deduplicate union relationships in load-dump
This commit is contained in:
parent
73bc2624e0
commit
6fd78867c8
|
@ -167,8 +167,14 @@ FROM individualrelation''')
|
|||
|
||||
relation_batch = []
|
||||
|
||||
seen = set()
|
||||
|
||||
for label, relationtype, responsibleid, subjectid in cursor.fetchall():
|
||||
if relationtype == 'SituationFamiliale':
|
||||
key = (min(responsibleid, subjectid), max(responsibleid, subjectid))
|
||||
if key in seen:
|
||||
continue
|
||||
seen.add(key)
|
||||
schema = union_schema
|
||||
if label == 'Marie':
|
||||
kind = 'mariage'
|
||||
|
|
Loading…
Reference in New Issue