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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]