michael-s-molina commented on code in PR #25156: URL: https://github.com/apache/superset/pull/25156#discussion_r1313045494
########## 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: Previously, `formDataWithNativeFilters.adhoc_filters` were only used if `adhocFilters.adhoc_filters` and `formDataFromSlice` were empty. Why were these checks necessary? Don't we need them anymore? -- 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