Fix vault caching count and NoneType iteration issues

- Fix 'NoneType' object is not iterable error in decrypt_labs_remote_cdm
- Fix vault count display showing 0/3 instead of actual successful vault count
This commit is contained in:
Andy
2025-09-10 06:33:46 +00:00
parent a82828768d
commit 307be4549b
2 changed files with 6 additions and 3 deletions

View File

@@ -625,8 +625,9 @@ class DecryptLabsRemoteCDM:
if "cached_keys" in session:
cached_keys = session.get("cached_keys", [])
for cached_key in cached_keys:
all_keys.append(cached_key)
if cached_keys:
for cached_key in cached_keys:
all_keys.append(cached_key)
for license_key in license_keys:
already_exists = False

View File

@@ -74,7 +74,9 @@ class Vaults:
for vault in self.vaults:
if not vault.no_push:
try:
success += bool(vault.add_keys(self.service, kid_keys))
# Count each vault that successfully processes the keys (whether new or existing)
vault.add_keys(self.service, kid_keys)
success += 1
except (PermissionError, NotImplementedError):
pass
return success