diff --git a/app/views/dashboard.py b/app/views/dashboard.py index 53f43b2..0ad5931 100644 --- a/app/views/dashboard.py +++ b/app/views/dashboard.py @@ -82,12 +82,11 @@ def show(): # --- 3. PLOTTING LOGIC --- if selected_curves: with st.spinner("Fetching log data..."): - # UPDATED QUERY: Join LogData -> CurveInfo - # We filter CurveInfo by well_log_id, then get data for those curves. + # Join LogData -> CurveInfo to filter by mnemonic results = db.query(LogData.depth, LogData.value, CurveInfo.mnemonic)\ .join(CurveInfo, LogData.curve_info_id == CurveInfo.id)\ .filter( - CurveInfo.well_log_id == selected_log_id, # Filter via CurveInfo + LogData.well_log_id == selected_log_id, CurveInfo.mnemonic.in_(selected_curves) ).all() diff --git a/migrations/env.py b/migrations/env.py index 6090f22..258d621 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -27,7 +27,7 @@ # Fallback for local development config.set_main_option( "sqlalchemy.url", - "mysql+pymysql://root@localhost:3306/well_log_db" + "mysql+pymysql://root:root@localhost:3307/well_log_db" ) # -----------------------