From 985ce5b6d0bf335458dc30a5a6003d9a80fa5284 Mon Sep 17 00:00:00 2001 From: maxachis Date: Sat, 26 Jul 2025 11:58:02 -0400 Subject: [PATCH] Address SQLAlchemy warnings --- src/db/enums.py | 2 ++ src/db/models/instantiations/link/batch_url.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/db/enums.py b/src/db/enums.py index 25701485..7ea8de8c 100644 --- a/src/db/enums.py +++ b/src/db/enums.py @@ -52,6 +52,8 @@ class ChangeLogOperationType(PyEnum): class PGEnum(TypeDecorator): impl = postgresql.ENUM + cache_ok = True + def process_bind_param(self, value: PyEnum, dialect): # Convert Python Enum to its value before binding to the DB if isinstance(value, PyEnum): diff --git a/src/db/models/instantiations/link/batch_url.py b/src/db/models/instantiations/link/batch_url.py index f40edc29..d86b0703 100644 --- a/src/db/models/instantiations/link/batch_url.py +++ b/src/db/models/instantiations/link/batch_url.py @@ -13,5 +13,5 @@ class LinkBatchURL( ): __tablename__ = "link_batch_urls" - url = relationship('URL') - batch = relationship('Batch') \ No newline at end of file + url = relationship('URL', overlaps="batch") + batch = relationship('Batch', overlaps="url") \ No newline at end of file