diff --git a/bemani/backend/iidx/cannonballers.py b/bemani/backend/iidx/cannonballers.py index 8264c68..f531626 100644 --- a/bemani/backend/iidx/cannonballers.py +++ b/bemani/backend/iidx/cannonballers.py @@ -2051,16 +2051,17 @@ class IIDXCannonBallers(IIDXCourse, IIDXBase): }) # Filter out empty charts - singles = [single for single in singles if single['id'] != 0] - doubles = [double for double in doubles if double['id'] != 0] + if name is not None: + singles = [single for single in singles if single['id'] != 0] + doubles = [double for double in doubles if double['id'] != 0] - newprofile.replace_dict( - name, - { - 'single': singles, - 'double': doubles, - }, - ) + newprofile.replace_dict( + name, + { + 'single': singles, + 'double': doubles, + }, + ) # DJ rank saving for dj_rank in request.children: diff --git a/bemani/backend/iidx/rootage.py b/bemani/backend/iidx/rootage.py index 2f027a5..eed45fa 100644 --- a/bemani/backend/iidx/rootage.py +++ b/bemani/backend/iidx/rootage.py @@ -1768,16 +1768,17 @@ class IIDXRootage(IIDXCourse, IIDXBase): }) # Filter out empty charts - singles = [single for single in singles if single['id'] != 0] - doubles = [double for double in doubles if double['id'] != 0] + if name is not None: + singles = [single for single in singles if single['id'] != 0] + doubles = [double for double in doubles if double['id'] != 0] - newprofile.replace_dict( - name, - { - 'single': singles, - 'double': doubles, - }, - ) + newprofile.replace_dict( + name, + { + 'single': singles, + 'double': doubles, + }, + ) # DJ rank saving for dj_rank in request.children: