From 39941fed56bb135233376db5974953a0014f6710 Mon Sep 17 00:00:00 2001 From: YISH Date: Tue, 21 May 2024 13:13:39 +0800 Subject: [PATCH] Fix type 'int' not iterable --- box/box.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/box/box.py b/box/box.py index 158a55e..7af1cd4 100644 --- a/box/box.py +++ b/box/box.py @@ -415,7 +415,8 @@ def __contains__(self, item): except BoxError: return False else: - return children in self[first_item] + it = self[first_item] + return isinstance(it, Iterable) and children in it def keys(self, dotted: Union[bool] = False): if not dotted: