fix(critical): permission cache returns None causing 500 on every authenticated API call

- get_cached_permissions() returned None when _get_current_permission_version failed
- deps.py get_current_user() crashed with AttributeError: NoneType.get()
- Fix: fall through to DB resolution instead of returning None
- Fix: add None guard in deps.py as safety net
This commit is contained in:
Agent Zero
2026-08-21 02:16:24 +02:00
parent 13e9865e8d
commit 3f8a8c93a7
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -340,7 +340,7 @@ async def get_cached_permissions(
exc_info=True,
)
await redis.delete(cache_key)
return None # Fall through to re-resolution from DB
# Fall through to re-resolution from DB (don't return None)
if cached_version == current_version:
return data