diff options
author | 2018-04-05 14:14:05 +0100 | |
---|---|---|
committer | 2018-04-05 14:14:05 +0100 | |
commit | 6a5de7cfdf5b419acd8258d5dbbd0b164662c140 (patch) | |
tree | 6a15fb90025330f615c954cb3a3aa7119410061e /pysite/decorators.py | |
parent | That was a little dumb. (diff) |
More work towards the wiki
Diffstat (limited to 'pysite/decorators.py')
-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): |