Fix storing copies of serialized objects in WebAPIResource.
Review Request #7082 — Created March 18, 2015 and submitted
WebAPIResource stores a copy of the generated serialized object for later use. This is because the caller may modify the contents, breaking what's later returned. We were using deepcopy() for this task, but that behaved very badly with Django models. We now have our own more light-weight function for safely cloning the data we care about from a serialized object. Fewer things need to be copied, and we know we're only duplicating what's needed.
Review Board and Djblets unit tests pass.
I didn't hit the breakage with Power Pack that I was previously hitting.
- Change Summary:
-
Fixed the docstring summary.
- Commit:
-
6c2b1199d6cd0e72fbf284fa0034968c4b91b88c0d331016544348ad44048cd92bfd17876711a960
- Diff:
-
Revision 2 (+29 -1)