File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments