fix restore config
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user