Fix config generation to always have all required params

This commit is contained in:
Logan Cusano
2025-04-27 02:54:54 -04:00
parent 0aa38a1eca
commit f8fb251290

View File

@@ -38,10 +38,7 @@ class ConfigGenerator:
"type": self.type,
"systemName": self.systemName,
"channels": self.channels,
"tags": [tag.to_dict() for tag in self.tags] if self.tags else None,
"whitelist": self.whitelist if self.whitelist else None
}
if self.tags is not None:
# Convert list of TalkgroupTag objects to list of dictionaries
data["tags"] = [tag.to_dict() for tag in self.tags]
if self.whitelist is not None:
data["whitelist"] = self.whitelist
return data