From 0d5983e7a94a09e868d1fb3b9747039eca60d4a6 Mon Sep 17 00:00:00 2001 From: JieguangZhou Date: Tue, 7 Jan 2025 17:06:15 +0800 Subject: [PATCH] Fix sqlalchemy cache --- plugins/sqlalchemy/superduper_sqlalchemy/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sqlalchemy/superduper_sqlalchemy/metadata.py b/plugins/sqlalchemy/superduper_sqlalchemy/metadata.py index f04cd8a02..1a641dee2 100644 --- a/plugins/sqlalchemy/superduper_sqlalchemy/metadata.py +++ b/plugins/sqlalchemy/superduper_sqlalchemy/metadata.py @@ -111,7 +111,7 @@ def get_metadata_by_identifier(self, type_id, identifier, version): return None if version is None: version = max(metadata.keys()) - return metadata[version] + return metadata.get(version) def update_metadata(self, metadata): self.add_metadata(metadata)