You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
864 B
26 lines
864 B
from _arango import arango |
|
from _llm import LLM |
|
|
|
interrogations = [i for i in arango.db.collection("interrogations").all()] |
|
|
|
|
|
for person in interrogations: |
|
if "full_name" not in person: |
|
person["full_name"] = None |
|
if 'role' not in person: |
|
person['role'] = None |
|
arango_doc = { |
|
"_key": arango.fix_key_name(person["person"]), |
|
"name": person["person"], |
|
"role": person["role"], |
|
"reason_for_interrogation": [person["topic"]], |
|
"full_name": person["full_name"], |
|
"interrogation_date": [person["date"]], |
|
"interrogations": [person["_key"]], |
|
} |
|
|
|
doc = arango.db.collection("persons").insert( |
|
arango_doc, overwrite_mode="update", merge=True, keep_none=False |
|
) |
|
|
|
arango.db.collection('interrogations').update({'_key': person['_key'], 'person_id': doc['_id']}, merge=False)
|
|
|