From 721d63e86fce87bf8ff30505f27ac468081b89ed Mon Sep 17 00:00:00 2001 From: Volodymyr Yevtushenko Date: Thu, 19 Mar 2020 15:00:20 +0200 Subject: [PATCH] Fix for empty body --- bottle_oauthlib/oauth2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bottle_oauthlib/oauth2.py b/bottle_oauthlib/oauth2.py index 74b0193..fba0080 100644 --- a/bottle_oauthlib/oauth2.py +++ b/bottle_oauthlib/oauth2.py @@ -43,7 +43,7 @@ def extract_params(bottle_request): if "application/json" in bottle_request.content_type: try: - body = bottle_request.json + body = bottle_request.json or {} except (ValueError, AttributeError): body = {}