From fa2c06972e3dca9055860871bb491f7eb487e70c Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 13 Nov 2024 15:01:33 +0100 Subject: [PATCH] sql query improvements --- app/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/orm.py b/app/orm.py index 73828fd..b13ed38 100644 --- a/app/orm.py +++ b/app/orm.py @@ -66,7 +66,7 @@ class Origin(Base): if origin_refs is None: deletions = session.query(Origin).delete() else: - deletions = session.query(Origin).filter(Origin.origin_ref in origin_refs).delete() + deletions = session.query(Origin).filter(Origin.origin_ref.in_(origin_refs)).delete() session.commit() session.close() return deletions