Open
Conversation
| PlaylistTrack.objects.get(pk=pk, room=room).delete() | ||
| p_track = PlaylistTrack.objects.get(pk=pk, room=room) | ||
| p_track.delete() | ||
| if p_track.track_type == PlaylistTrack.SHUFFLE: |
Owner
There was a problem hiding this comment.
using p_track after a delete() looks dangerous
+ commit migration for min/max value of shuffled musics + better playlist serialization
+ fix some crash on malformed url (top with a target crashed for exemple)
+ add test for playlistTrack change type (good and bad cases)
+ fix fill playlist shuffle on delete shuffle PT + typo
playlistTrack are now listed in the corresponding room
+ less messages sent + less BDD calls
SPT = shuffled playlistTrack NPT = normal playlisTrack + reactivation of filling SPT by music already in SPT (will probably change it again in futur but cause too many major problems for now)
+ preparation for dual list ordering (and changing playlistrack type)
…y-futur-musics-shuffle
| return Response('"{}" action needs a target parameter'.format(action), status=status.HTTP_400_BAD_REQUEST) | ||
|
|
||
| if action == 'changetype': | ||
| if target not in {'NORMAL', 'SHUFFLE'}: |
Amoki
reviewed
Sep 19, 2016
|
|
||
| def test_change_playlistTrack_type(self): | ||
| response = self.client.post('/playlist/%s/changetype/SHUFFLE' % self.pt.pk) | ||
| print(response.data) |
…y-futur-musics-shuffle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
* Not mergeable* !
Only open for commenting the code.