I have an ArangoDB collection containing some documents. I need to get one of them, add or update some data and save it.
To get the document, I use Document
_key
field on Collection
instance:
doc = collection[key]
Then, I update with a dict
data:
for k, v in data.items():
doc[k] = v
finally, I save it
doc.save()
Unfortunately some of the int
are converted to string
Juste before saving:
And when I reload it with doc2 = collection[key]
:
From what I'm seeing, I guess I could convert all int
to float
before saving, but it's kind of messy.
What am I doing wrong?