michael-s-molina commented on code in PR #20645:
URL: https://github.com/apache/superset/pull/20645#discussion_r916775724


##########
superset-frontend/src/explore/actions/hydrateExplore.ts:
##########
@@ -120,17 +121,21 @@ export const hydrateExplore =
       lastRendered: 0,
     };
 
+    const allDatasources = {
+      ...datasources,
+      [getDatasourceUid(initialDatasource)]: initialDatasource,
+    };
+
+    dispatch(initDatasources(allDatasources));
+
     return dispatch({
       type: HYDRATE_EXPLORE,
       data: {
         charts: {
           ...charts,
           [chartKey]: chart,
         },
-        datasources: {
-          ...datasources,
-          [getDatasourceUid(initialDatasource)]: initialDatasource,
-        },
+        datasources: allDatasources,

Review Comment:
   You're right, we don't need `datasources` in `HYDRATE_EXPLORE`. Removed. 
   We need `initDatasources` because it's a different state branch handled by 
the datasources reducer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to