Convert freqs to string before sending to DRB API
This commit is contained in:
@@ -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 []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user