Add get for system type

This commit is contained in:
Logan Cusano
2025-04-27 02:37:25 -04:00
parent b75d89b904
commit a3ff5f6694

View File

@@ -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
)