Fix bad stoken error.

We were calling the validation constructor wrong.
master
Tom Hacohen 4 years ago
parent 06f2dd72a7
commit 9152e6f42d

@ -116,11 +116,7 @@ class BaseViewSet(viewsets.ModelViewSet):
try:
return Stoken.objects.get(uid=stoken)
except Stoken.DoesNotExist:
raise EtebaseValidationError({
'code': 'bad_stoken',
'detail': 'Invalid stoken.',
},
status_code=status.HTTP_400_BAD_REQUEST)
raise EtebaseValidationError('bad_stoken', 'Invalid stoken.', status_code=status.HTTP_400_BAD_REQUEST)
return None

Loading…
Cancel
Save