Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove call to expire_all in ODL code #2076

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/palace/manager/api/odl/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down
2 changes: 2 additions & 0 deletions tests/manager/api/odl/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Loading