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.
19 lines
732 B
19 lines
732 B
from _arango import arango |
|
|
|
# arango.db.collection("other_persons").truncate() |
|
# arango.db.collection("all_relations").truncate() |
|
|
|
# persons = list(arango.db.collection("persons").all()) |
|
|
|
# for person in persons: |
|
# for interrogation in person['interrogations']: |
|
|
|
# arango.db.collection('interrogations').update({'_key': interrogation, 'person_id': person['_id']}, ) |
|
# print(f"Updated {interrogation} with person_id {person['_id']}") |
|
|
|
|
|
interrogations = list(arango.db.collection("interrogations").all()) |
|
|
|
for interrogation in interrogations: |
|
interrogation['person_id'] = 'persons/' + interrogation['person'].replace('persons_', '') |
|
arango.db.collection('interrogations').update(interrogation, merge=False) |