From 34b499c40153a20382789c6754285659923125d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= <1771332+vlaci@users.noreply.github.com> Date: Fri, 19 Dec 2025 15:44:16 +0100 Subject: [PATCH] fix(examples): fix type of tenants variable Filter returns a generator, so it cannot be indexed on the next line. With list comprehension the code is also simpler --- examples/get_tenant_token.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/get_tenant_token.py b/examples/get_tenant_token.py index 20d1157..d7ba871 100644 --- a/examples/get_tenant_token.py +++ b/examples/get_tenant_token.py @@ -17,7 +17,8 @@ if len(sys.argv) > 2: # Filter tenants that matches the provided pattern - tenants = filter(lambda tenant: sys.argv[2] in tenant.name, tenants) + pattern = sys.argv[2] + tenants = [t for t in tenants if pattern in t.name] # Pick the first one tenant = tenants[0]