alwaysgood commited on
Commit
ca1121a
·
verified ·
1 Parent(s): af7854e

Update api_utils.py

Browse files
Files changed (1) hide show
  1. api_utils.py +3 -3
api_utils.py CHANGED
@@ -138,7 +138,7 @@ def api_get_tide_level(
138
  data={
139
  "record_time": time_kst.isoformat(), # KST로 변환
140
  "record_time_kst": time_kst.strftime('%Y-%m-%d %H:%M:%S KST'),
141
- "final_value": round(data.get('final_tide_level', 0), 1),
142
  "residual_value": round(data.get('predicted_residual', 0), 1),
143
  "harmonic_value": round(data.get('harmonic_level', 0), 1),
144
  "data_source": "final_prediction",
@@ -181,7 +181,7 @@ def api_get_tide_level(
181
  data={
182
  "record_time": time_kst.isoformat(), # KST로 변환
183
  "record_time_kst": time_kst.strftime('%Y-%m-%d %H:%M:%S KST'),
184
- "final_value": round(data.get('harmonic_level', 0), 1),
185
  "residual_value": None, # 잔차 예측 없음
186
  "harmonic_value": round(data.get('harmonic_level', 0), 1),
187
  "data_source": "harmonic_only",
@@ -556,7 +556,7 @@ def api_compare_stations(
556
  comparison_data.append({
557
  "station_id": station_id,
558
  "station_name": STATION_NAMES.get(station_id, "Unknown"),
559
- "tide_level": data.get("final_value"),
560
  "data_source": data.get("data_source"),
561
  "time": data.get("record_time")
562
  })
 
138
  data={
139
  "record_time": time_kst.isoformat(), # KST로 변환
140
  "record_time_kst": time_kst.strftime('%Y-%m-%d %H:%M:%S KST'),
141
+ "tide_level": round(data.get('final_tide_level', 0), 1),
142
  "residual_value": round(data.get('predicted_residual', 0), 1),
143
  "harmonic_value": round(data.get('harmonic_level', 0), 1),
144
  "data_source": "final_prediction",
 
181
  data={
182
  "record_time": time_kst.isoformat(), # KST로 변환
183
  "record_time_kst": time_kst.strftime('%Y-%m-%d %H:%M:%S KST'),
184
+ "tide_level": round(data.get('harmonic_level', 0), 1),
185
  "residual_value": None, # 잔차 예측 없음
186
  "harmonic_value": round(data.get('harmonic_level', 0), 1),
187
  "data_source": "harmonic_only",
 
556
  comparison_data.append({
557
  "station_id": station_id,
558
  "station_name": STATION_NAMES.get(station_id, "Unknown"),
559
+ "tide_level": data.get("tide_level"),
560
  "data_source": data.get("data_source"),
561
  "time": data.get("record_time")
562
  })