From 089a8c677cc911e62880c8a29d28e835adc3c707 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 12 Jan 2016 12:06:34 -0800 Subject: [PATCH] [hotfix] no data --- panoramix/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panoramix/models.py b/panoramix/models.py index 24e94518ac3cb..157721ce2b79b 100644 --- a/panoramix/models.py +++ b/panoramix/models.py @@ -916,8 +916,8 @@ def query( client.groupby(**qry) query_str += json.dumps(client.query_dict, indent=2) df = client.export_pandas() - if not df: - raise Exception("No data") + if df is None or df.size == 0: + raise Exception("No data was returned.") if not is_timeseries and 'timestamp' in df.columns: del df['timestamp']