-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoDatabase client returns KeyError or fields with dictionary values. #7
Comments
Just to make sure, if you do something like I added the automatic un-packing of property fields using |
Yes, that behaviour is working as expected. I was just concerned that if there is certain property which is just a dictionary, it might create unexpected errors. I think easiest would be to check if there is a 'source-value' field inside, and if not, return the whole dictionary? What do you think? |
I like the idea of having |
Yes, I think that would be most sensible. We can also try something like |
That's another question that I've been struggling with: how much should we try to hide the Mongo API behind the |
I think currently it is pretty well balanced overall. With get_data being the lowest level api, and |
If mongo entry for a database is a dictionary the
MongoClient.get_data
tries to findsource-val
key, and raises KeyValue error on its absence. Therefore it fails for any dictionary without a KeyValue field.See example below:
The text was updated successfully, but these errors were encountered: