fix grouped data when there is no drilldown chosen (fixes #12718)

This commit is contained in:
Benjamin Dauvergne 2016-07-25 16:13:23 +02:00
parent afe0f1f167
commit 6552014b2c
1 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,8 @@ class CubeMixin(object):
def get_grouped_data(self, cleaned_data, stringify=True):
data = self.get_data(cleaned_data, stringify=stringify)
dims = len(cleaned_data.get('drilldown', []))
if not dims:
return ([(v, 0) for v in row] for row in data)
grouped = OrderedDict()
for row in data:
d = grouped