From 300efe4877551947b6cb116c3b673d624e4afe52 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 25 Aug 2019 17:35:01 -0500 Subject: [PATCH] Tweak how we detect JSON request body instead of POST params i.e. when processing submitted form data --- tailbone/forms/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailbone/forms/core.py b/tailbone/forms/core.py index f5c2f28e..109cc2df 100644 --- a/tailbone/forms/core.py +++ b/tailbone/forms/core.py @@ -921,7 +921,7 @@ class Form(object): # use POST or JSON body, whichever is present # TODO: per docs, some JS libraries may not set this flag? # https://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request.is_xhr - if self.request.is_xhr: + if self.request.is_xhr and not self.request.POST: controls = self.request.json_body.items() # TODO: why in the hell is this necessary? some colander forms