Restored 2.5 compatibility and actual fix for the json problem

This commit is contained in:
Armin Ronacher 2010-07-04 20:07:03 +02:00
parent 80eb6cfffc
commit 51a89bf35e
4 changed files with 9 additions and 4 deletions

View file

@ -12,7 +12,7 @@
from werkzeug import Request as RequestBase, Response as ResponseBase, \
cached_property
from .helpers import json
from .helpers import json, _assert_have_json
class Request(RequestBase):
@ -52,7 +52,6 @@ class Request(RequestBase):
parsed JSON data.
"""
if __debug__:
from flask.helpers import _assert_have_json
_assert_have_json()
if self.mimetype == 'application/json':
return json.loads(self.data)