You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/08/04 17:13:47 UTC

[superset] 14/16: fix(explore): invalid "No Filter" applied (#24876)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 84035badab4a189ac25ab40f5254e9e1d26d5d95
Author: JUST.in DO IT <ju...@airbnb.com>
AuthorDate: Thu Aug 3 06:17:56 2023 -0700

    fix(explore): invalid "No Filter" applied (#24876)
    
    (cherry picked from commit 371bffbfea3494f3a535e148fbe99b17a3a8a020)
---
 superset-frontend/src/explore/actions/saveModalActions.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/explore/actions/saveModalActions.js b/superset-frontend/src/explore/actions/saveModalActions.js
index 1a9970ab75..32b34cbed4 100644
--- a/superset-frontend/src/explore/actions/saveModalActions.js
+++ b/superset-frontend/src/explore/actions/saveModalActions.js
@@ -21,6 +21,7 @@ import { SupersetClient, t } from '@superset-ui/core';
 import { addSuccessToast } from 'src/components/MessageToasts/actions';
 import { isEmpty } from 'lodash';
 import { buildV1ChartDataPayload } from '../exploreUtils';
+import { Operators } from '../constants';
 
 const ADHOC_FILTER_REGEX = /^adhoc_filters/;
 
@@ -81,7 +82,8 @@ export const getSlicePayload = (
   if (
     isEmpty(adhocFilters?.adhoc_filters) &&
     isEmpty(formDataFromSlice) &&
-    formDataWithNativeFilters?.adhoc_filters?.length > 0
+    formDataWithNativeFilters?.adhoc_filters?.[0]?.operator ===
+      Operators.TEMPORAL_RANGE
   ) {
     adhocFilters.adhoc_filters = [
       {