Convert freqs to string before sending to DRB API

This commit is contained in:
Logan Cusano
2025-06-23 00:50:39 -04:00
parent 66d65d65dd
commit 663e2c8305

View File

@@ -1,5 +1,5 @@
from enum import Enum
from typing import Dict, Any, List, Optional
from typing import Dict, Any, List, Optional, Union
class DemodTypes(str, Enum):
P25 = "P25"
@@ -22,7 +22,7 @@ class ConfigGenerator:
self,
type: DemodTypes,
systemName: str,
channels: List[str],
channels: List[Union[str, int]],
tags: Optional[List[TalkgroupTag]] = None,
whitelist: Optional[List[int]] = None
):
@@ -37,7 +37,7 @@ class ConfigGenerator:
data = {
"type": self.type,
"systemName": self.systemName,
"channels": self.channels,
"channels": [str(channel) for channel in self.channels ],
"tags": [tag.to_dict() for tag in self.tags] if self.tags else [],
"whitelist": self.whitelist if self.whitelist else []
}