From 0ce6ad6fc8e386b7158452b3829752617a0d36c0 Mon Sep 17 00:00:00 2001 From: Aleksandra Ovchinnikova Date: Fri, 1 Dec 2023 14:26:26 -0800 Subject: [PATCH] LITE-29138 Fix bool method for ResourceSet --- connect/client/models/resourceset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/connect/client/models/resourceset.py b/connect/client/models/resourceset.py index f2a046a..bf9d0a7 100644 --- a/connect/client/models/resourceset.py +++ b/connect/client/models/resourceset.py @@ -312,8 +312,9 @@ def __iter__(self): return iter(self._results) def __bool__(self): - self._fetch_all() - return bool(self._results) + copy = self._copy() + copy._fetch_all() + return bool(copy._results) def __getitem__(self, key): # noqa: CCR001 self._validate_key(key)