From d25a22272eb1ee589ca9425b77ebc49f4b177478 Mon Sep 17 00:00:00 2001 From: WhatshallIbreaktoday <75358410+WhatshallIbreaktoday@users.noreply.github.com> Date: Wed, 12 Oct 2022 08:10:35 +0200 Subject: [PATCH] allow null/None JSON data This change permits to proxy pdns zone notify api requests (which are expected to be with empty body) --- powerdnsadmin/lib/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerdnsadmin/lib/helper.py b/powerdnsadmin/lib/helper.py index a5925ef..1b5a082 100644 --- a/powerdnsadmin/lib/helper.py +++ b/powerdnsadmin/lib/helper.py @@ -14,9 +14,9 @@ def forward_request(): msg_str = "Sending request to powerdns API {0}" if request.method != 'GET' and request.method != 'DELETE': - msg = msg_str.format(request.get_json(force=True)) + msg = msg_str.format(request.get_json(force=True, silent=True)) current_app.logger.debug(msg) - data = request.get_json(force=True) + data = request.get_json(force=True, silent=True) verify = False