From 7afa35698bba18e78901c7df6502e89ce4d94c25 Mon Sep 17 00:00:00 2001 From: pablo-gar Date: Wed, 27 Nov 2024 17:30:10 -0800 Subject: [PATCH] fix empty filter bug --- src/genomic_features/ensembl/ensembldb.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/genomic_features/ensembl/ensembldb.py b/src/genomic_features/ensembl/ensembldb.py index 82f420d..3d61ac7 100644 --- a/src/genomic_features/ensembl/ensembldb.py +++ b/src/genomic_features/ensembl/ensembldb.py @@ -309,7 +309,12 @@ def _build_query( else: query = self.db.table(table) # add filter - query = query.filter(filter.convert()).select(cols).order_by(cols) + + filter = filter.convert() + if filter is not None: + query = query.filter(filter) + + query = query.select(cols).order_by(cols) return query def _join_query(