From 9d339d8b11898691d1f32a76c62d65ff815454f2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 13 Mar 2021 21:10:13 +0100 Subject: [PATCH] policies: fix error when clearing policy cache when no policies are cached Signed-off-by: Jens Langhammer --- authentik/policies/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/policies/signals.py b/authentik/policies/signals.py index 3fabc7202..fabde968f 100644 --- a/authentik/policies/signals.py +++ b/authentik/policies/signals.py @@ -26,5 +26,5 @@ def invalidate_policy_cache(sender, instance, **_): 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("*")) + keys = cache.keys(user_app_cache_key("*")) or [] cache.delete_many(keys)