Skip to content

bugfix: put newly added fields in _data #282

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

Closed
wants to merge 19 commits into from
Closed

Conversation

leesper
Copy link
Contributor

@leesper leesper commented Apr 18, 2016

Hi Mr Dirkjan, I think I found a problem when using couchdb-python in my project, please let me describe it: I have a data model called User, with the evolving of our business, this model has got a new field called 'xxx', but in the application code, if I load a previous User data that doesn't contain a 'xxx' field, and call user.xxx, couchdb-python will return a default value to me, but actually 'xxx' hasn't been put in the _data dict, so when I call user.store(db), the information is still missing. So I added a little bit of code, thank you! : )

@djc
Copy link
Owner

djc commented Apr 27, 2016

@leesper you should probably reset your branch to match my master before creating more pull requests from it. This is way messy. Anyway, the same discussion is going on in #275, and I think that has a more comprehensive solution for this going on.

@djc djc closed this Apr 27, 2016
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

Successfully merging this pull request may close these issues.

2 participants