From 489f16d81c45df3f7a5cadaa7f131d6c8c2de001 Mon Sep 17 00:00:00 2001 From: hsekowski <33931928+hsekowski@users.noreply.github.com> Date: Tue, 2 May 2023 17:58:04 +0200 Subject: [PATCH] fix: resolves https://github.com/swagger-api/swagger-codegen-generators/issues/1141 --- src/main/resources/handlebars/python/rest.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/handlebars/python/rest.mustache b/src/main/resources/handlebars/python/rest.mustache index af0603ace7..e661dca9ab 100644 --- a/src/main/resources/handlebars/python/rest.mustache +++ b/src/main/resources/handlebars/python/rest.mustache @@ -147,7 +147,7 @@ class RESTClientObject(object): if query_params: url += '?' + urlencode(query_params) if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' + request_body = None if method == 'DELETE' else '{}' if body is not None: request_body = json.dumps(body) r = self.pool_manager.request(