From 2c078cbc7c879aa0e640aa9a6aa1c2e0d3e0c62a Mon Sep 17 00:00:00 2001 From: Arksine Date: Tue, 20 Apr 2021 06:34:46 -0400 Subject: [PATCH] database: don't return forbidden namespaces in the list request Signed-off-by: Eric Callahan --- moonraker/components/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moonraker/components/database.py b/moonraker/components/database.py index 134d216..9a7f5c5 100644 --- a/moonraker/components/database.py +++ b/moonraker/components/database.py @@ -286,7 +286,8 @@ class MoonrakerDatabase: f"Error decoding value {bvalue}, format: {chr(fmt)}") async def _handle_list_request(self, web_request): - return {'namespaces': list(self.namespaces.keys())} + ns_list = set(self.namespaces.keys()) - self.forbidden_namespaces + return {'namespaces': list(ns_list)} async def _handle_item_request(self, web_request): action = web_request.get_action()