From 60990db88d19c970f85ddfb3006e85e1e05af537 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 12 Feb 2023 20:33:28 +0100 Subject: [PATCH] Fixed collection building #89 --- kdb-bot/src/bot_graphql/abc/query_abc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdb-bot/src/bot_graphql/abc/query_abc.py b/kdb-bot/src/bot_graphql/abc/query_abc.py index 53215b97..a1d567cb 100644 --- a/kdb-bot/src/bot_graphql/abc/query_abc.py +++ b/kdb-bot/src/bot_graphql/abc/query_abc.py @@ -52,9 +52,9 @@ class QueryABC(ObjectType): if user == "system" or user.auth_role == AuthRoleEnum.admin: return self._resolve_collection(collection, *args, **kwargs) - for x in collection: + for x in collection.to_list(): if not self._can_user_see_element(user, x): - return List() + collection.remove(x) return self._resolve_collection(collection, *args, **kwargs)