From e2539d9fb07d588f78aac9fd5b99580a266715ec Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Tue, 12 Nov 2024 14:50:05 -0800 Subject: [PATCH] add some defaults --- graphql_api/types/test_analytics/test_analytics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphql_api/types/test_analytics/test_analytics.py b/graphql_api/types/test_analytics/test_analytics.py index 51e7ff5d56..3017f42720 100644 --- a/graphql_api/types/test_analytics/test_analytics.py +++ b/graphql_api/types/test_analytics/test_analytics.py @@ -285,7 +285,7 @@ def get_test_suites( if term: testsuites = testsuites.filter(pl.col("testsuite").str.starts_with(term)) - return testsuites.to_series().to_list() + return testsuites.to_series().drop_nulls().to_list() or [] def get_flags(repoid: int, term: str | None = None, interval: int = 30) -> list[str]: @@ -300,7 +300,7 @@ def get_flags(repoid: int, term: str | None = None, interval: int = 30) -> list[ if term: flags = flags.filter(pl.col("flags").str.starts_with(term)) - return flags.to_series().to_list() + return flags.to_series().drop_nulls().to_list() or [] class TestResultsOrdering(TypedDict):