From a90e33bb047a3d5770a6417d30614d3cb91ca7f6 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Wed, 12 Aug 2015 20:29:51 -0700 Subject: [PATCH] T335: Moved the fix to the comparison where it's needed. --- app/scripts/app/controllers/account-track.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/app/controllers/account-track.coffee b/app/scripts/app/controllers/account-track.coffee index 21017781..75a41bfa 100644 --- a/app/scripts/app/controllers/account-track.coffee +++ b/app/scripts/app/controllers/account-track.coffee @@ -96,7 +96,7 @@ angular.module('ponyfm').controller "account-track", [ else if value != null formData.append name, value - if $scope.edit.track_type_id == 2 + if parseInt($scope.edit.track_type_id) == 2 formData.append 'show_song_ids', _.map(_.values($scope.selectedSongs), (s) -> s.id).join() xhr.open 'POST', '/api/web/tracks/edit/' + $scope.edit.id, true @@ -116,7 +116,7 @@ angular.module('ponyfm').controller "account-track", [ is_vocal: track.is_vocal license_id: track.license_id genre_id: track.genre_id - track_type_id: parseInt(track.track_type_id) + track_type_id: track.track_type_id released_at: if track.released_at then track.released_at.date else '' remove_cover: false cover: track.cover_url