Fix subscription updates when subcription has add_ons #242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #240
Reported By: @ScottSpittle
We are seeing an issue with updating subscriptions containing add ons. Using the
updateImmediately
method was generating some xml which was trying to update immutable fields for the subscription add ons on the backend. The update payload was looking something like this:And the resulting error:
I added some code to ignore the immutable fields on update but I think this is a larger problem around changes to arrays not being tracked. We shouldn't be rendering the subscription add ons unless they have changed.
So while this should be a fine solution to this problem, I think a follow up should be made to investigate how we handle tracking of changes on arrays of objects.