DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

Fact URL always shows the first fact (hello_world example) #370

Closed RacingTadpole closed 7 years ago

RacingTadpole commented 8 years ago

When I run slicer serve in the example/hello_world directory, and visit

http://localhost:5000/cube/irbd_balance/fact/20,

regardless of which id (eg. 20) I put at the end of the URL, I always get the same fact, with __fact_key__: 1. Have I missed something? Thanks!

KhaledTo commented 8 years ago

Hi, this seems to happen in cubes/sql/browser.py in the fact function.

In the condition : condition = statement.columns[FACT_KEY_LABEL] == key_value

The first row (with the first id ) is always returned, it doesn't matter which key_value you pass.

Stiivi commented 7 years ago

This seems to be fixed.