diff --git a/CHANGELOG.md b/CHANGELOG.md index c46cde36..ffd7d1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- When renaming session templates during migration, use correct database key to store renamed template. ## [2.31.0] - 2024-11-01 ### Removed diff --git a/src/bos/server/migrations/sanitize.py b/src/bos/server/migrations/sanitize.py index 946b0505..4c198c10 100644 --- a/src/bos/server/migrations/sanitize.py +++ b/src/bos/server/migrations/sanitize.py @@ -138,7 +138,7 @@ def _sanitize_session_template(key: str | bytes, data: dict) -> None: delete_template(key, data) - new_key = get_tenant_aware_key(name, tenant) + new_key = get_tenant_aware_key(new_name, tenant) LOGGER.info("Old DB key = '%s', new DB key = '%s'", key, new_key) new_data["name"] = new_name