Skip to content

Commit e967c32

Browse files
committed
refactor: fix is_legacy_token
1 parent ba4fbf1 commit e967c32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2_provider/oauth2_validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def save_bearer_token(self, token, request, *args, **kwargs):
480480

481481
# Users on older app versions should get long-lived tokens for
482482
# backwards compatibility.
483-
is_legacy_token = getattr(request, 'is_legacy_token', False)
483+
is_legacy_token = getattr(request, 'is_legacy_token') == 'True'
484484

485485
if is_legacy_token:
486486
expire_seconds = oauth2_settings.LEGACY_ACCESS_TOKEN_EXPIRE_SECONDS

0 commit comments

Comments
 (0)