From c67f7c122bb9443b0392e7ea6df867e6f05972b0 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 24 Jan 2025 19:53:59 +0530 Subject: [PATCH] non expistent capabilities are not available --- pandora/user/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandora/user/models.py b/pandora/user/models.py index 7f0a51a8..4234ab45 100644 --- a/pandora/user/models.py +++ b/pandora/user/models.py @@ -436,8 +436,7 @@ def has_capability(user, capability): level = 'guest' else: level = user.profile.get_level() - return level in settings.CONFIG['capabilities'][capability] \ - and settings.CONFIG['capabilities'][capability][level] + return settings.CONFIG['capabilities'].get(capability, {}).get(level) def merge_users(old, new): old.annotations.all().update(user=new)