Skip to content
This repository was archived by the owner on Jul 22, 2019. It is now read-only.

bugfix: put newly added fields in _data #282

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants