Skip to content

Commit

Permalink
fix(dashboard): user id can be null when there is an anonymous user (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
suddjian authored Aug 5, 2021
1 parent b72fd7b commit 2307216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset-frontend/src/dashboard/actions/hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2307216

Please sign in to comment.