conflict error
This commit is contained in:
parent
0365d17095
commit
7256578ec7
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
from rest_framework.throttling import UserRateThrottle
|
from rest_framework.throttling import UserRateThrottle
|
||||||
|
|
||||||
from apps.gooyal_oauth2.models import AccessToken
|
from apps.gooyal_oauth2.models import AccessToken
|
||||||
from utils.exceptions import Conflict
|
|
||||||
|
|
||||||
|
|
||||||
def get_application(request):
|
def get_application(request):
|
||||||
|
|
@ -33,6 +32,7 @@ class TokenLimitThrottle:
|
||||||
if request.auth.token in active_tokens:
|
if request.auth.token in active_tokens:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
from utils.exceptions import Conflict
|
||||||
raise Conflict(code='max_allowed_session_reached')
|
raise Conflict(code='max_allowed_session_reached')
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue