feat: Preserve password and API token in integration settings loading

This commit is contained in:
JB
2025-11-28 18:57:53 -08:00
parent a9489dec2d
commit 48e9534b68
+4 -2
View File
@@ -331,10 +331,12 @@ def load_integration_settings() -> Dict[str, Dict[str, Any]]:
merged[field] = str(value or "") merged[field] = str(value or "")
if key == "calibre_opds": if key == "calibre_opds":
merged["has_password"] = bool(isinstance(stored, Mapping) and stored.get("password")) merged["has_password"] = bool(isinstance(stored, Mapping) and stored.get("password"))
merged["password"] = "" # Do not clear the password here, let the template decide whether to show it or not
# merged["password"] = ""
elif key == "audiobookshelf": elif key == "audiobookshelf":
merged["has_api_token"] = bool(isinstance(stored, Mapping) and stored.get("api_token")) merged["has_api_token"] = bool(isinstance(stored, Mapping) and stored.get("api_token"))
merged["api_token"] = "" # Do not clear the token here
# merged["api_token"] = ""
integrations[key] = merged integrations[key] = merged
return integrations return integrations