Skip to content

Commit

Permalink
Fix tests for enzsub loops
Browse files Browse the repository at this point in the history
  • Loading branch information
Balazs Bohar committed Feb 27, 2025
1 parent a862828 commit d6e4a07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions omnipath_server/service/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1837,13 +1837,9 @@ def _query(
query = self._select(args, query_type)
query = self._where(query, args, query_type)

if extra_where is not None:

if isinstance(extra_where, _const.LIST_LIKE):

extra_where = (w for w in extra_where if w is not None)
extra_where = and_(*extra_where)
if extra_where := [w for w in _misc.to_list(extra_where) if w is not None]:

extra_where = and_(*extra_where)
query = query.filter(extra_where)

query = self._limit(query, args)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_service_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
),
(
{'loops': True},
'(enzsub.ncbi_tax_id = ANY (ARRAY[%(param_1)s]))',
'enzsub.ncbi_tax_id = ANY (ARRAY[%(param_1)s])',
),
],
'intercell': [
Expand Down

0 comments on commit d6e4a07

Please sign in to comment.