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
Create copy of note dict in update_note to avoid external modification
Never really paid attention to this, but because the dict is mutable we
end up modifying the external reference:
```
note = {...}
n, s = sn.update_note(note)
note = {... plus other stuff}
```
Probably been "broken" for ages, but only made obvious when we started
adding in the fields required for Simperium.
---
Strictly speaking should/could create copies of the note dict in the
`__add...` and `__remove...` methods, but since those are internal only
I can't see it causing a problem.
Add a test for it as well.
Fixes: #26
0 commit comments