-
-
Notifications
You must be signed in to change notification settings - Fork 324
Accidental mutation of old model causes invalid JSON Patch #801
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
Comments
This issue was discovered to still exist while working with this test component. |
Turns out, the invalid JSON patch was produced because I was mutating something I shouldn't have been. |
Will we be sticking to using |
The issue I posted there is still valid, but the hacked fix I provided for it appears to work. So I don't think we need to drop |
I still think we should plan to remove it eventually though. |
* fix #801 accidental mutation of old parent model caused invalid JSON patches * add build_py to cmdclass distutils has also been deprecated
Current Situation
Unfortunately, the monkey patch applied to
jsonpatch
doesn't seem to have really fixed the problem. I don't believe that we'll be able to resolve this issue and, even if we were, the library doesn't really seem to be maintained.Proposed Actions
Instead of actually computing a diff, just use a
replace
operation where the value is the new render. This will probably have a performance cost in cases where network latency dominates. The alternative though, is getting an error on occasion when JSON patch fails to generate a correct diff.The text was updated successfully, but these errors were encountered: