From 8ef774391ba75ea1ea0813cb843def8f87ba5476 Mon Sep 17 00:00:00 2001 From: Songyan Ho Date: Tue, 2 May 2017 11:14:10 +0800 Subject: [PATCH] Fix missing curUserId from SliderAdder.jsx --- superset/assets/javascripts/dashboard/Dashboard.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superset/assets/javascripts/dashboard/Dashboard.jsx b/superset/assets/javascripts/dashboard/Dashboard.jsx index 2910324cd608e..0f586a8b7d998 100644 --- a/superset/assets/javascripts/dashboard/Dashboard.jsx +++ b/superset/assets/javascripts/dashboard/Dashboard.jsx @@ -96,10 +96,11 @@ function initDashboardView(dashboard) { $('[data-toggle="tooltip"]').tooltip({ container: 'body' }); } -export function dashboardContainer(dashboard, datasources) { +export function dashboardContainer(dashboard, datasources, userid) { return Object.assign({}, dashboard, { type: 'dashboard', filters: {}, + curUserId: userid, init() { this.sliceObjects = []; dashboard.slices.forEach((data) => { @@ -340,7 +341,7 @@ $(document).ready(() => { const dashboardData = $('.dashboard').data('bootstrap'); const state = getInitialState(dashboardData); - const dashboard = dashboardContainer(state.dashboard, state.datasources); + const dashboard = dashboardContainer(state.dashboard, state.datasources, state.user_id); initDashboardView(dashboard); dashboard.init(); });