Skip to content

Comma in dimension name causes filtering error #78

@fpieront

Description

@fpieront

I have found that with CubesViewer 2.0.2, Cubes 1.1 and Django 1.9, dimensions containing a comma produce the following error when selected for filtering:

capture

The Cubes slicer server returns:

    condition = context.condition_for_cell(cell)
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 948, in condition_for_cell
    condition = and_(*self.conditions_for_cuts(cell.cuts))
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 966, in conditions_for_cuts
    hierarchy, cut.invert)
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 1004, in condition_for_point
    levels = self.level_keys(dim, hierarchy, path)
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 1098, in level_keys
    raise HierarchyError("Path '{}' is longer than hierarchy. "
NameError: global name 'HierarchyError' is not defined

The request passed to the Cubes server is the following:

"GET /cube/listings_cube_ph/aggregate?cut=agent%40default%3ADimension%2C+Name. HTTP/1.0" 500 -

(it seems that '%2C represents the comma).
`

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions