From b6e6a1416c7720bfcaeff245f20bfe945966c500 Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Wed, 18 Sep 2024 13:59:05 -0300 Subject: [PATCH] Remove expiry in ODL code --- src/palace/manager/api/odl/api.py | 2 -- tests/manager/api/odl/test_api.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/palace/manager/api/odl/api.py b/src/palace/manager/api/odl/api.py index d20d91c0a..45f530086 100644 --- a/src/palace/manager/api/odl/api.py +++ b/src/palace/manager/api/odl/api.py @@ -769,8 +769,6 @@ def _update_hold_end_date( days=default_reservation_period ) - _db.expire_all() - def _update_hold_position(self, holdinfo: HoldInfo, pool: LicensePool) -> None: _db = Session.object_session(pool) loans_count = ( diff --git a/tests/manager/api/odl/test_api.py b/tests/manager/api/odl/test_api.py index 9b558f7d5..4252ae168 100644 --- a/tests/manager/api/odl/test_api.py +++ b/tests/manager/api/odl/test_api.py @@ -160,6 +160,8 @@ def test_hold_limit( # Do the same, patron1 checkout and test patron hold pool = work2.active_license_pool() + db.session.expire_all() + assert pool is not None response = opds2_with_odl_api_fixture.checkout(patron=patron1, pool=pool) assert (