aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/decorators.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-04-05 14:14:05 +0100
committerGravatar Gareth Coles <[email protected]>2018-04-05 14:14:05 +0100
commit6a5de7cfdf5b419acd8258d5dbbd0b164662c140 (patch)
tree6a15fb90025330f615c954cb3a3aa7119410061e /pysite/decorators.py
parentThat was a little dumb. (diff)
More work towards the wiki
Diffstat (limited to 'pysite/decorators.py')
-rw-r--r--pysite/decorators.py2
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):