Fix bad stoken error.
We were calling the validation constructor wrong.
This commit is contained in:
parent
06f2dd72a7
commit
9152e6f42d
@ -116,11 +116,7 @@ class BaseViewSet(viewsets.ModelViewSet):
|
|||||||
try:
|
try:
|
||||||
return Stoken.objects.get(uid=stoken)
|
return Stoken.objects.get(uid=stoken)
|
||||||
except Stoken.DoesNotExist:
|
except Stoken.DoesNotExist:
|
||||||
raise EtebaseValidationError({
|
raise EtebaseValidationError('bad_stoken', 'Invalid stoken.', status_code=status.HTTP_400_BAD_REQUEST)
|
||||||
'code': 'bad_stoken',
|
|
||||||
'detail': 'Invalid stoken.',
|
|
||||||
},
|
|
||||||
status_code=status.HTTP_400_BAD_REQUEST)
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user