Skip to content

Commit

Permalink
fixed bins.json config path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hyi authored and kennethmorton committed Nov 19, 2021
1 parent c22c550 commit 1c034c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion icees_api/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .features.qgraph_utils import normalize_qgraph
from .features.sql import validate_range
from .features.mappings import mappings, correlations
from .features.config import get_config_path
from .models import (
Features,
FeatureAssociation, FeatureAssociation2,
Expand Down Expand Up @@ -754,7 +755,8 @@ def handle_bins(
api_key: APIKey = Depends(get_api_key),
) -> Dict:
"""Return bin values."""
with open("config/bins.json", "r") as stream:
input_file = os.path.join(get_config_path(), "bins.json")
with open(input_file, "r") as stream:
bins = json.load(stream)
if feature is not None:
bins = {
Expand Down

0 comments on commit 1c034c0

Please sign in to comment.