diff --git a/authentik/policies/signals.py b/authentik/policies/signals.py index f38a508ce..c9baf9624 100644 --- a/authentik/policies/signals.py +++ b/authentik/policies/signals.py @@ -23,6 +23,6 @@ def invalidate_policy_cache(sender, instance, **_): total += len(keys) cache.delete_many(keys) LOGGER.debug("Invalidating policy cache", policy=instance, keys=total) - # Also delete user application cache - keys = cache.keys(user_app_cache_key("*")) or [] - cache.delete_many(keys) + # Also delete user application cache + keys = cache.keys(user_app_cache_key("*")) or [] + cache.delete_many(keys)