Add get for system type
This commit is contained in:
@@ -71,9 +71,9 @@ async def join_server(system_id, guild_id, channel_id):
|
||||
tags_list = [TalkgroupTag(**tag_dict) for tag_dict in sys_details.get('tags', []) if tag_dict] if sys_details.get('tags') is not None else None
|
||||
|
||||
sys_config = ConfigGenerator(
|
||||
type=sys_details['decode_mode'],
|
||||
type=sys_details.get('decode_mode'),
|
||||
systemName=sys_details['name'],
|
||||
frequencies=sys_details['frequency_list_khz'], # Assuming 'channels' is the correct field name
|
||||
frequencies=sys_details.get('frequency_list_khz'), # Assuming 'channels' is the correct field name
|
||||
tags=tags_list,
|
||||
whitelist=sys_details.get('tag_whitelist') # Use .get for optional fields
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user