Skip to content

Commit

Permalink
use correct agg measure reference. addresses #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Stiivi committed Jun 4, 2016
1 parent 08d4b9f commit 860dbcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cubes-mongo/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _date_transform(item, date_field):
group = phys.group
elif function:
group_applicator = function["group_by"]
group = group_applicator(escape_level(agg.ref()))
group = group_applicator(escape_level(agg.measure.ref()))
else:
raise ModelError("Neither function or mapping group specified "
"for aggregate '%s' in cube '%s'"
Expand Down
5 changes: 4 additions & 1 deletion cubes-mongo/datesupport.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# -*-coding=utf -*-

from __future__ import absolute_import

from dateutil.relativedelta import relativedelta
from datetime import datetime, timedelta
from dateutil.tz import *

from functools import partial
import pytz


DATE_PARTS = ['year', 'month', 'day']
Expand Down

0 comments on commit 860dbcf

Please sign in to comment.