X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c52436a7e25876ee3509df2467c2a9ef33303436..7259f33ebe13b4b61cc9c4b1d5f97d6cd5e79976:/apps/wiki/helpers.py?ds=sidebyside diff --git a/apps/wiki/helpers.py b/apps/wiki/helpers.py index 553b1e44..bc4b7602 100644 --- a/apps/wiki/helpers.py +++ b/apps/wiki/helpers.py @@ -24,9 +24,8 @@ class JSONResponse(http.HttpResponse): # get rid of mimetype kwargs.pop('mimetype', None) - super(JSONResponse, self).__init__( - json.dumps(data, cls=ExtendedEncoder), - mimetype="application/json", **kwargs) + data = json.dumps(data, cls=ExtendedEncoder) + super(JSONResponse, self).__init__(data, mimetype="application/json", **kwargs) # return errors