Commit 08e7c87e authored by Daniel Albert's avatar Daniel Albert

Fix REST API

parent ce4fbc92
......@@ -19,8 +19,7 @@ class bot_api(object):
if key is not None:
request.user = ApiKey.objects.get(key=key)
# raise(NotImplementedError(str(type(request.user))))
if request.user and not request.user.is_anonymous:
if request.user and (not isinstance(request.user, ApiKey) or not request.user.is_anonymous):
return self.f(request, *args, **kwargs)
else:
raise ApiKey.DoesNotExist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment