database: fix typo in http exception

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-02-19 12:56:10 -05:00
parent 96b00549cf
commit 2d28a3eeff
1 changed files with 5 additions and 3 deletions

View File

@ -711,10 +711,12 @@ class MoonrakerDatabase:
key: Any
valid_types: Tuple[type, ...]
if action != "GET":
if namespace in self.protected_namespaces and \
not self.enable_debug:
if (
namespace in self.protected_namespaces and
not self.enable_debug
):
raise self.server.error(
f"Write access to namespaces '{namespace}'"
f"Write access to namespace '{namespace}'"
" is forbidden", 403)
key = web_request.get("key")
valid_types = (list, str)