[PAY-3192] Fix two issues with playlist_contents and added_timestamps #9217
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.
Description
playlist_modelexpects that the type ofplaylist_contentswill be the same shape as that ofadded_timestamps. This is due to the change in [C-2735] Add updatePlaylist and publishPlaylist to sdk #5570 where we replaceplaylist_contentswithadded_timestampsas a client/SDK convenience. But we only do that in theplaylistsendpoints./repostsis missing this behavior so the marshaller malfunctions on the playlist items from that endpoint.added_timestampsincorrectly returns the entire playlist as a response ifplaylist_contentsis empty. I think this was originally meant as a "decorator" method that would modify the contents in place and return the modified object, then converted to a utility that computes the value of a property and returns it. I updated the name of the function and fixed the early return to be an empty list.How Has This Been Tested?
Tested locally against local stack.