diff options
Diffstat (limited to '')
| -rw-r--r-- | pysite/decorators.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/pysite/decorators.py b/pysite/decorators.py index 653489b4..426d4846 100644 --- a/pysite/decorators.py +++ b/pysite/decorators.py @@ -34,7 +34,7 @@ def require_roles(*roles: int):              if data:                  for role in roles: -                    if role in data["roles"]: +                    if role in data.get("roles", []):                          return f(self, *args, **kwargs)                  if isinstance(self, APIView): | 
