diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e387d51057375db5a14c70ed1b10d4759c4ca107..5405e8c4dce35474d4a473f0be87052dbf109ed6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,7 @@ Fixed * Migration added in 2.7.2 did not work in all scenarios * [Dev] Field change tracking API for Person was broken in 2.7.2 +* [OAuth] Automatic clean-up of expired OAuth tokens could fail * Add missing documentation `2.7.2`_ - 2022-01-31 diff --git a/aleksis/core/tasks.py b/aleksis/core/tasks.py index 97ccfa2270b9d87ab8698414ce87c53f06446d22..847fc41281a0266cff16bbe2117e326e13abc0dd 100644 --- a/aleksis/core/tasks.py +++ b/aleksis/core/tasks.py @@ -45,6 +45,6 @@ def backup_data() -> None: @app.task(run_every=timedelta(days=1)) def clear_oauth_tokens(): """Clear expired OAuth2 tokens.""" - from oauth2_provider.models import clear_tokens # noqa + from oauth2_provider.models import clear_expired # noqa - return clear_tokens() + return clear_expired()