betodealmeida commented on a change in pull request #4651: [explore] proper 
filtering of NULLs and ''
URL: 
https://github.com/apache/incubator-superset/pull/4651#discussion_r181227279
 
 

 ##########
 File path: superset/connectors/base/models.py
 ##########
 @@ -185,6 +186,34 @@ def data(self):
             'verbose_map': verbose_map,
         }
 
+    @staticmethod
+    def filter_values_handler(
+            values, target_column_is_numeric=False, is_list_target=False):
+        def handle_single_value(v):
+            # backward compatibility with previous <select> components
+            if isinstance(v, basestring):
+                v = v.strip().strip("'").strip('"')
 
 Review comment:
   You can do a single strip to remove whitespace and single/double quotes:
   
   ```python
   v = v.strip(' \'"')
   ```
   
   Or, to also take care of tabs and line feeds:
   
   ```python
   v = v.strip('\t\n \'"')
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to