From 64117aad77dd5d15b2afd9f6f754a65838c07458 Mon Sep 17 00:00:00 2001 From: alejandromumo Date: Tue, 31 Oct 2023 16:00:00 +0100 Subject: [PATCH] lock: added return statement to lock acquire. --- invenio_users_resources/services/users/lock.py | 2 +- invenio_users_resources/services/users/service.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/invenio_users_resources/services/users/lock.py b/invenio_users_resources/services/users/lock.py index c9f1d57..9d3000b 100644 --- a/invenio_users_resources/services/users/lock.py +++ b/invenio_users_resources/services/users/lock.py @@ -38,4 +38,4 @@ def acquire(self, timeout=None): If the timeout is not provided, a default is retrieved from the config USERS_RESOURCES_MODERATION_LOCK_DEFAULT_TIMEOUT """ timeout = timeout or timeout_default - super().acquire(timeout=timeout_default) + return super().acquire(timeout=timeout_default) diff --git a/invenio_users_resources/services/users/service.py b/invenio_users_resources/services/users/service.py index 3ec22c8..494bf50 100644 --- a/invenio_users_resources/services/users/service.py +++ b/invenio_users_resources/services/users/service.py @@ -32,10 +32,6 @@ from ...records.api import UserAggregate from .lock import ModerationMutex -mod_lock_timeout = LocalProxy( - lambda: current_app.config.get("USERS_RESOURCES_MODERATION_LOCK_DEFAULT_TIMEOUT") -) - class UsersService(RecordService): """Users service."""