fix restore config

This commit is contained in:
larssand
2026-07-06 09:46:22 +02:00
parent bddc84395c
commit 830ca79dfa
2 changed files with 11 additions and 1 deletions

View File

@@ -82,10 +82,13 @@ class ConfigStore:
elif key == "threat_intel_provider" and value in {"auto", "abuseipdb", "virustotal"}:
current[key] = value
elif key == "graylog_streams" and isinstance(value, list):
current[key] = [
streams = [
{"id": str(item.get("id", "")), "title": str(item.get("title", "")), "enabled": bool(item.get("enabled"))}
for item in value if isinstance(item, dict) and item.get("id")
]
if not streams and current.get("graylog_streams"):
continue
current[key] = streams
elif key == "graylog_stream_profiles" and isinstance(value, list):
current[key] = [item for item in value if isinstance(item, dict) and item.get("stream_id")]
elif isinstance(value, str):