-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
possible bug in document_etag function #16
Comments
Excellent, thanks! Will review as soon as possible. |
And little addon - json.dumps not support bson.ObjectIt, but bson.json_util does |
Good call. However, have you actually seen the documents sorted differently upon restart/different server instances? I ask because I was under the impression that PyMongo/BSON documents use the SON class, which is basically a backport of Py3x/27 OrderedDict (I didn't verify it carefully though). |
Not working for me:
|
@LarryEitel it should work:
Passes all tests (well except |
"However, have you actually seen the documents sorted differently upon restart/different server instances?" Yes. I draw form, ajaxing data from form to eve server, and it pass till validation error (required field missing, in my case). I can do this several times with the same result. |
Gotcha, will fix. |
please use in function document_etag something like this:
json.dumps(value, sort_keys=True) for dict,
instead of
str(value)
In the second case - order (and hash) will be different when script restart, or between different server instances
The text was updated successfully, but these errors were encountered: