T335: Moved the fix to the comparison where it's needed.

This commit is contained in:
Peter Deltchev 2015-08-12 20:29:51 -07:00
parent 6276f9b564
commit a90e33bb04

View file

@ -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