hughhhh commented on a change in pull request #16162:
URL: https://github.com/apache/superset/pull/16162#discussion_r686200512



##########
File path: superset-frontend/src/explore/components/ExploreChartPanel.jsx
##########
@@ -132,7 +132,7 @@ const ExploreChartPanel = props => {
   const { slice } = props;
   const updateQueryContext = useCallback(
     async function fetchChartData() {
-      if (slice && slice.query_context === null) {
+      if (props.can_overwrite && slice && slice.query_context === null) {

Review comment:
       deconstruct `can_overwrite` above then use just `can_overwrite` in if
   ```
   const { can_overwrite, slice } = props;
   ``

##########
File path: superset-frontend/src/explore/components/ExploreChartPanel.jsx
##########
@@ -132,7 +132,7 @@ const ExploreChartPanel = props => {
   const { slice } = props;
   const updateQueryContext = useCallback(
     async function fetchChartData() {
-      if (slice && slice.query_context === null) {
+      if (props.can_overwrite && slice && slice.query_context === null) {

Review comment:
       deconstruct `can_overwrite` above then use just `can_overwrite` in if
   ```
   const { can_overwrite, slice } = props;
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to