From 5d17cc4e197df8820ed5537e0fae7646b3d88ca6 Mon Sep 17 00:00:00 2001 From: Marigold Date: Mon, 16 Dec 2024 17:45:02 +0100 Subject: [PATCH] :bug: fix nullable value handling in dictionary to check for list type --- apps/backport/datasync/data_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/backport/datasync/data_metadata.py b/apps/backport/datasync/data_metadata.py index bc32f2a8471..1707164e42a 100644 --- a/apps/backport/datasync/data_metadata.py +++ b/apps/backport/datasync/data_metadata.py @@ -261,7 +261,7 @@ def _convert_strings_to_numeric(lst: List[str]) -> List[Union[int, float, str]]: def _omit_nullable_values(d: dict) -> dict: out = {} for k, v in d.items(): - if hasattr(v, "__len__"): + if isinstance(v, list): if len(v) > 0: out[k] = v elif v is not None and not pd.isna(v):