Skip to content

Commit cdfdad2

Browse files
committed
updates pop logic
1 parent d39006d commit cdfdad2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/orca/services/nextflowtower/client.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,7 @@ def request_paged(self, method: str, path: str, **kwargs) -> dict[str, Any]:
113113
while num_items < total_size:
114114
kwargs["params"]["offset"] = num_items
115115
json = self.request_json(method, path, **kwargs)
116-
total_size = (
117-
json.pop("totalSize")
118-
if json.get("totalSize") is not None
119-
else json.pop("total")
120-
if json.get("total") is not None
121-
else 0
122-
)
116+
total_size = json.pop("totalSize", None) or json.pop("total", 0)
123117
key_name, items = json.popitem()
124118
num_items += len(items)
125119
all_items.extend(items)

0 commit comments

Comments
 (0)