From e4f13253e5d246646a2812233fe9f6e76cfa3622 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Fri, 23 Dec 2016 23:13:48 +0200 Subject: [PATCH] Fix #1432: delete visualization sends full visualization body instead of only id --- client/app/components/dynamic-table/index.js | 4 +--- client/app/pages/queries/source-view.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/app/components/dynamic-table/index.js b/client/app/components/dynamic-table/index.js index c0e2157778..d174ce1f54 100644 --- a/client/app/components/dynamic-table/index.js +++ b/client/app/components/dynamic-table/index.js @@ -43,9 +43,7 @@ function DynamicTable($sanitize) { } }; - this.sanitize = (value) => { - return $sanitize(value); - } + this.sanitize = value => $sanitize(value); this.sortIcon = (column) => { if (column !== this.orderByField) { diff --git a/client/app/pages/queries/source-view.js b/client/app/pages/queries/source-view.js index 7325db85a6..0eac46282c 100644 --- a/client/app/pages/queries/source-view.js +++ b/client/app/pages/queries/source-view.js @@ -91,7 +91,7 @@ function QuerySourceCtrl(Events, toastr, $controller, $scope, $location, $http, AlertDialog.open(title, message, confirm).then(() => { Events.record('delete', 'visualization', vis.id); - Visualization.delete(vis, () => { + Visualization.delete({ id: vis.id }, () => { if ($scope.selectedTab === vis.id) { $scope.selectedTab = DEFAULT_TAB; $location.hash($scope.selectedTab);