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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user