diff --git a/apps/gooyal_oauth2/throttling.py b/apps/gooyal_oauth2/throttling.py index 03c5e70..6373213 100644 --- a/apps/gooyal_oauth2/throttling.py +++ b/apps/gooyal_oauth2/throttling.py @@ -1,7 +1,6 @@ from rest_framework.throttling import UserRateThrottle from apps.gooyal_oauth2.models import AccessToken -from utils.exceptions import Conflict def get_application(request): @@ -33,6 +32,7 @@ class TokenLimitThrottle: if request.auth.token in active_tokens: return True else: + from utils.exceptions import Conflict raise Conflict(code='max_allowed_session_reached') else: