diff --git a/src/genomic_features/ensembl/ensembldb.py b/src/genomic_features/ensembl/ensembldb.py index 82f420d..2e34287 100644 --- a/src/genomic_features/ensembl/ensembldb.py +++ b/src/genomic_features/ensembl/ensembldb.py @@ -309,7 +309,13 @@ 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 None: + query = query.select(cols).order_by(cols) + else: + query = query.filter(filter).select(cols).order_by(cols) + return query def _join_query(