You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/08/10 05:01:22 UTC
[superset] 12/25: fix(dashboard): user id can be null when there is
an anonymous user (#15592)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch 1.3
in repository https://gitbox.apache.org/repos/asf/superset.git
commit a688da5aa7c8f609df1bf53c24e154d43daceae1
Author: David Aaron Suddjian <18...@users.noreply.github.com>
AuthorDate: Thu Aug 5 15:35:10 2021 -0700
fix(dashboard): user id can be null when there is an anonymous user (#15592)
(cherry picked from commit 23072161e2414ef3408aa77a19fd4bbabf983ded)
---
superset-frontend/src/dashboard/actions/hydrate.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/actions/hydrate.js b/superset-frontend/src/dashboard/actions/hydrate.js
index 67ce361..9c524e2 100644
--- a/superset-frontend/src/dashboard/actions/hydrate.js
+++ b/superset-frontend/src/dashboard/actions/hydrate.js
@@ -335,7 +335,7 @@ export const hydrateDashboard = (dashboardData, chartData) => (
dashboardInfo: {
...dashboardData,
metadata,
- userId: String(user.userId), // legacy, please use state.user instead
+ userId: user.userId ? String(user.userId) : null, // legacy, please use state.user instead
dash_edit_perm: canEdit,
dash_save_perm: findPermission('can_save_dash', 'Superset', roles),
dash_share_perm: findPermission(