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


##########
superset-frontend/src/explore/actions/saveModalActions.js:
##########
@@ -79,19 +79,15 @@ export const getSlicePayload = (
     adhocFilters = extractAddHocFiltersFromFormData(formDataFromSlice);
   }
 
-  if (
-    isEmpty(adhocFilters?.adhoc_filters) &&
-    isEmpty(formDataFromSlice) &&
-    formDataWithNativeFilters?.adhoc_filters?.[0]?.operator ===
-      Operators.TEMPORAL_RANGE
-  ) {
-    adhocFilters.adhoc_filters = [
-      {
-        ...formDataWithNativeFilters.adhoc_filters[0],
-        comparator: 'No filter',
-      },
-    ];
-  }
+  // This loop iterates through the adhoc_filters array in 
formDataWithNativeFilters.
+  // If a filter is of type TEMPORAL_RANGE and isExtra, it sets its comparator 
to
+  // 'No filter' and adds the modified filter to the adhocFilters array. This 
ensures that all
+  // TEMPORAL_RANGE filters are converted to 'No filter' when saving a chart.
+  formDataWithNativeFilters?.adhoc_filters?.forEach(filter => {

Review Comment:
   Thank you for the additional context @lilykuang. Do you know if the fixes in 
https://github.com/apache/superset/pull/24405 and 
https://github.com/apache/superset/pull/24876 are not affected by this change?



-- 
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