修复 AMOS 数据不显示:移出 include_nearby 条件判断

根因:_attach_korean_amos_data 在 include_nearby 块内
面板模式(depth=panel)时 include_nearby=False
→ AMOS 数据从不获取 → detail.amos 始终为空 → 跑道面板不显示

修复:AMOS 调用移到 include_nearby 之外
AMOS 是主观测源,不是 nearby 站网数据
无论 depth 模式都应获取
This commit is contained in:
2569718930@qq.com
2026-05-10 19:10:38 +08:00
parent 40cd8fc2a6
commit 5512ebf133
+2 -2
View File
@@ -1011,10 +1011,10 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
include_mgm=include_mgm,
include_nearby=include_nearby,
)
self._attach_korean_amos_data(results, city_lower, use_fahrenheit)
if include_nearby:
self._attach_china_official_nearby(results, city_lower, use_fahrenheit)
self._attach_japan_official_nearby(results, city_lower, use_fahrenheit)
self._attach_korean_amos_data(results, city_lower, use_fahrenheit)
self._attach_russia_official_nearby(results, city_lower, use_fahrenheit)
if city_lower == "warsaw":
self._attach_warsaw_official_nearby(results, use_fahrenheit)
@@ -1053,10 +1053,10 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
include_mgm=include_mgm,
include_nearby=include_nearby,
)
self._attach_korean_amos_data(results, city_lower, use_fahrenheit)
if include_nearby:
self._attach_china_official_nearby(results, city_lower, use_fahrenheit)
self._attach_japan_official_nearby(results, city_lower, use_fahrenheit)
self._attach_korean_amos_data(results, city_lower, use_fahrenheit)
self._attach_russia_official_nearby(results, city_lower, use_fahrenheit)
if city_lower == "warsaw":
self._attach_warsaw_official_nearby(results, use_fahrenheit)