Skip to content

Commit 9d8ead4

Browse files
committed
fix: No need to handle bad state profile store
This is handled during schema validation on load #13 Branch: Profiles-13 Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent 08b55d9 commit 9d8ead4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cforge/profile_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ def get_active_profile() -> AuthProfile:
218218
"""
219219
if (store := load_profile_store()) and store.active_profile_id:
220220
profile = store.profiles.get(store.active_profile_id)
221-
if not profile:
222-
raise ValueError("BAD STATE: Profile store active profile id not found in profiles")
221+
# This should be unreachable due to validation on loading
222+
assert profile, "BAD STATE: Profile store active profile id not found in profiles"
223223
return profile
224224

225225
# Check if Desktop app has created a default profile

0 commit comments

Comments
 (0)