You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/06/26 23:20:00 UTC

[GitHub] john-bodley commented on a change in pull request #5274: [get_df] Fix datetime conversion

john-bodley commented on a change in pull request #5274: [get_df] Fix datetime conversion
URL: https://github.com/apache/incubator-superset/pull/5274#discussion_r198326086
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -197,13 +197,11 @@ def get_df(self, query_obj=None):
         # be considered as the default ISO date format
         # If the datetime format is unix, the parse will use the corresponding
         # parsing logic.
-        if df is None or df.empty:
-            return pd.DataFrame()
-        else:
+        if not df.empty:
 
 Review comment:
   The check was only there because we were mocking the pandas.DataFrame. The data is obtained from [pandas.read_sql_query](https://pandas.pydata.org/pandas-docs/version/0.22.0/generated/pandas.read_sql_query.html) which returns a pandas.DataFrame object.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org