Skip to content
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

$addToSet operator is not adding None values correctly #151

Closed
dongxinEric opened this issue Apr 10, 2019 · 1 comment
Closed

$addToSet operator is not adding None values correctly #151

dongxinEric opened this issue Apr 10, 2019 · 1 comment
Assignees
Labels
bug Something isn't working In progress Actively working on the issue
Milestone

Comments

@dongxinEric
Copy link
Contributor

When using $addToSet operator to add a None value to an array who has a deeply nested None value, DocLayer thinks the None value is duplicated and thus throws it away.

For example this reproducible case:

coll.remove()
coll.insert_one({'_id':1, 'B': [{'a': {'b': {'c': {'d':None}}}}]})
coll.update({'_id':1}, {'$addToSet': {u'B': None}})

The document is NOT updated correctly.

@dongxinEric
Copy link
Contributor Author

My gut feeling is that this is caused by the same root bug that also caused #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working In progress Actively working on the issue
Projects
None yet
Development

No branches or pull requests

1 participant