Fix an issue where "spot providers enabled by default" was still being fetched through WEB_UI_OPTIONS on a path that required spot providers to have a "name" field in *config* rather than at runtime. Closes #124

This commit is contained in:
Ian Renton
2026-08-10 06:06:33 +01:00
parent d9ce8db48b
commit 7860b60f47
17 changed files with 32 additions and 42 deletions
+2 -1
View File
@@ -60,7 +60,8 @@ class StatusReporter:
self._status_data["num_spots"] = len(self._spots)
self._status_data["num_alerts"] = len(self._alerts)
self._status_data["spot_providers"] = list(
map(lambda p: {"name": p.name, "enabled": p.enabled, "status": p.status,
map(lambda p: {"name": p.name, "enabled": p.enabled,
"enabled_by_default_in_web_ui": p.enabled_by_default_in_web_ui, "status": p.status,
"last_updated": p.last_update_time.replace(
tzinfo=pytz.UTC).timestamp() if p.last_update_time.year > 2000 else 0,
"last_spot": p.last_spot_time.replace(