-
Notifications
You must be signed in to change notification settings - Fork 229
Handle empty value objects properly #481
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
Handle empty value objects properly #481
Conversation
|
I think this is better handled in |
|
I thought about that, but i’m not sure how that would work as I do not want the instance that is assigned statically to be serialised. If you know how to fix this better, please supersede this PR |
|
@Gobot1234 How would you like to proceed with this / what can I do better here? |
|
Looks good to me |
|
Would you mind adding a test case for this regression? (and also fixing the formatting better than I did 😉 |
|
Thanks for reviewing - I am in the middle of exams at the moment though so won’t be able to get to this for a while. Plus, I don’t really know how to write tests but i could work that out |
|
@olijeffers0n friendly poke, if you don't have time to finish this I can take over if you want |
|
Yeah, I have time I just don’t know how to write unit tests. I’m happy for you to take over |
|
Thanks |
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
Closes #479 by attempting to set the serialization state upon setting the attribute. I am not familiar with this codebase however I believe this should work properly, and does from my testing.
For context, the previous approach only set the serialisation state to be truthy when an attribute of this "child" message was updated. This does not work for empty message structures so it needs to be set when the new object is assigned instead.