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

Repeat _ids #7

Closed
rmcgibbo opened this issue Jul 2, 2014 · 2 comments
Closed

Repeat _ids #7

rmcgibbo opened this issue Jul 2, 2014 · 2 comments

Comments

@rmcgibbo
Copy link

rmcgibbo commented Jul 2, 2014

I seem to be getting multiple repeated _ids when the db is opened and closed repeatedly, and each session only inserts one entry. Is this expected?

>>> TinyDB('db.json').insert({'x': 1})
>>> TinyDB('db.json').insert({'x': 1})
>>> TinyDB('db.json').all()
[{u'_id': 0, u'x': 1}, {u'_id': 0, u'x': 1}]

This is with 1.2.0 from pypi

$ pip freeze | grep tinydb
tinydb==1.2.0
msiemens added a commit that referenced this issue Jul 2, 2014
@rmcgibbo
Copy link
Author

rmcgibbo commented Jul 2, 2014

Awesome!

@msiemens
Copy link
Owner

msiemens commented Jul 2, 2014

Thanks for reporting this issue! I've just uploaded v1.3.0 where this is fixed (along with some other changes) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants