Skip to content

Commit 1c034c0

Browse files
hyikennethmorton
authored andcommitted
fixed bins.json config path issue
1 parent c22c550 commit 1c034c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

icees_api/handlers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from .features.qgraph_utils import normalize_qgraph
1818
from .features.sql import validate_range
1919
from .features.mappings import mappings, correlations
20+
from .features.config import get_config_path
2021
from .models import (
2122
Features,
2223
FeatureAssociation, FeatureAssociation2,
@@ -754,7 +755,8 @@ def handle_bins(
754755
api_key: APIKey = Depends(get_api_key),
755756
) -> Dict:
756757
"""Return bin values."""
757-
with open("config/bins.json", "r") as stream:
758+
input_file = os.path.join(get_config_path(), "bins.json")
759+
with open(input_file, "r") as stream:
758760
bins = json.load(stream)
759761
if feature is not None:
760762
bins = {

0 commit comments

Comments
 (0)