Commit 5b98e9b2 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

erp5_api_style: Add condition on jIOWebSection to handle livetests

parent 61d62941
...@@ -108,7 +108,7 @@ class jIOWebSection(WebSection): ...@@ -108,7 +108,7 @@ class jIOWebSection(WebSection):
__bobo_traverse__ from DocumentExtensibleTraversableMixin is not called __bobo_traverse__ from DocumentExtensibleTraversableMixin is not called
""" """
# Register current web site physical path for later URL generation # Register current web site physical path for later URL generation
if self.REQUEST.REQUEST_METHOD == "GET": if not self.REQUEST.get("live_test", False) and self.REQUEST.REQUEST_METHOD == "GET":
return self._asjIOStyle(mode="get", text_content=self.REQUEST.form.keys()[0]) return self._asjIOStyle(mode="get", text_content=self.REQUEST.form.keys()[0])
return self._asjIOStyle(mode="get", text_content=self.REQUEST.get('BODY')) return self._asjIOStyle(mode="get", text_content=self.REQUEST.get('BODY'))
...@@ -137,6 +137,6 @@ class jIOWebSection(WebSection): ...@@ -137,6 +137,6 @@ class jIOWebSection(WebSection):
__bobo_traverse__ from DocumentExtensibleTraversableMixin is not called __bobo_traverse__ from DocumentExtensibleTraversableMixin is not called
""" """
# Register current web site physical path for later URL generation # Register current web site physical path for later URL generation
if self.REQUEST.REQUEST_METHOD == "GET": if not self.REQUEST.get("live_test", False) and self.REQUEST.REQUEST_METHOD == "GET":
return self._asjIOStyle(mode="allDocs", text_content=self.REQUEST.form.keys()[0]) return self._asjIOStyle(mode="allDocs", text_content=self.REQUEST.form.keys()[0])
return self._asjIOStyle(mode="allDocs", text_content=self.REQUEST.get('BODY')) return self._asjIOStyle(mode="allDocs", text_content=self.REQUEST.get('BODY'))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment