Convert freqs to string before sending to DRB API
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Dict, Any, List, Optional
|
from typing import Dict, Any, List, Optional, Union
|
||||||
|
|
||||||
class DemodTypes(str, Enum):
|
class DemodTypes(str, Enum):
|
||||||
P25 = "P25"
|
P25 = "P25"
|
||||||
@@ -22,7 +22,7 @@ class ConfigGenerator:
|
|||||||
self,
|
self,
|
||||||
type: DemodTypes,
|
type: DemodTypes,
|
||||||
systemName: str,
|
systemName: str,
|
||||||
channels: List[str],
|
channels: List[Union[str, int]],
|
||||||
tags: Optional[List[TalkgroupTag]] = None,
|
tags: Optional[List[TalkgroupTag]] = None,
|
||||||
whitelist: Optional[List[int]] = None
|
whitelist: Optional[List[int]] = None
|
||||||
):
|
):
|
||||||
@@ -37,7 +37,7 @@ class ConfigGenerator:
|
|||||||
data = {
|
data = {
|
||||||
"type": self.type,
|
"type": self.type,
|
||||||
"systemName": self.systemName,
|
"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 [],
|
"tags": [tag.to_dict() for tag in self.tags] if self.tags else [],
|
||||||
"whitelist": self.whitelist if self.whitelist else []
|
"whitelist": self.whitelist if self.whitelist else []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user