You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
class Doc(SchemaDocument):
structure = {'test': u''}
i18n = ['test']
then registering the Doc to some collection we initiate a doc: doc = con.test.Doc()
now I would assume that those two lines would create the same document:
doc.test = u'this is working with i18n!'
doc.validate() # this one is working, and i18n field is doing fine
doc.update({'test': u'this is NOT working!'}) # update just replace the value of 'text' avoiding the custom __setattr__
doc.validate() # FAIL!
I think that the 'update' method should be also custom and could use the custom setattr
I've also written a test that demonstrate this case.
Do you agree that the behavior should be the same?
Is there another preferred way to use 'update' or should I create a Pull Request?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Assuming we do the following:
then registering the
Doc
to some collection we initiate adoc
:doc = con.test.Doc()
now I would assume that those two lines would create the same document:
I think that the 'update' method should be also custom and could use the custom setattr
I've also written a test that demonstrate this case.
Do you agree that the behavior should be the same?
Is there another preferred way to use 'update' or should I create a Pull Request?
The text was updated successfully, but these errors were encountered: