Skip to content

Commit d4b37a3

Browse files
fix lint error
1 parent 7aff982 commit d4b37a3

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

lib/galaxy/managers/workflows.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ def build_invocations_query(
518518
sort_desc=None,
519519
include_nested_invocations=True,
520520
check_ownership=True,
521-
filters=[],
521+
filters=None,
522522
) -> Tuple[List, int]:
523523
"""Get invocations owned by the current user."""
524524

@@ -547,10 +547,11 @@ def build_invocations_query(
547547
)
548548
stmt = stmt.where(~subquery)
549549

550-
# Apply any filters from the filters array
551-
for filter_item in filters:
552-
if hasattr(filter_item, "filter_type") and filter_item.filter_type == "orm":
553-
stmt = stmt.where(filter_item.filter)
550+
if filters is not None:
551+
# Apply any filters from the filters array
552+
for filter_item in filters:
553+
if hasattr(filter_item, "filter_type") and filter_item.filter_type == "orm":
554+
stmt = stmt.where(filter_item.filter)
554555

555556
total_matches = get_count(trans.sa_session, stmt)
556557

0 commit comments

Comments
 (0)