Fix config generation to always have all required params
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user