Fix pack type grouping logic in packs display

Previously p_group was only set if pack type already existed in p_data,
which would silently skip new pack types. Now properly initializes the
pack type list when encountering a new type.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-01-08 14:22:06 -06:00
parent 08fd7bec75
commit 541c5bbc1e

View File

@ -263,8 +263,10 @@ class Packs(commands.Cog):
logger.debug(f'pack: {pack}') logger.debug(f'pack: {pack}')
logger.debug(f'pack cardset: {pack["pack_cardset"]}') logger.debug(f'pack cardset: {pack["pack_cardset"]}')
if pack['pack_team'] is None and pack['pack_cardset'] is None: if pack['pack_team'] is None and pack['pack_cardset'] is None:
if pack['pack_type']['name'] in p_data: p_group = pack['pack_type']['name']
p_group = pack['pack_type']['name'] # Add to p_data if this is a new pack type
if p_group not in p_data:
p_data[p_group] = []
elif pack['pack_team'] is not None: elif pack['pack_team'] is not None:
if pack['pack_type']['name'] == 'Standard': if pack['pack_type']['name'] == 'Standard':