Skip to content

Commit

Permalink
fix 'charset value not specified error' for .zip, .savzip and .csvzip…
Browse files Browse the repository at this point in the history
… exports

resolves #2284
  • Loading branch information
ciremusyoka committed Mar 29, 2023
1 parent 86ebc16 commit 827f08a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onadata/libs/renderers/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
if isinstance(data, six.text_type):
return data.encode("utf-8")
if isinstance(data, dict):
return json.dumps(data)
return json.dumps(data).encode("utf-8")
return data


Expand All @@ -181,7 +181,7 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
if isinstance(data, six.text_type):
return data.encode("utf-8")
if isinstance(data, dict):
return json.dumps(data)
return json.dumps(data).encode("utf-8")
return data


Expand Down Expand Up @@ -552,7 +552,7 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
if isinstance(data, six.text_type):
return data.encode("utf-8")
if isinstance(data, dict):
return json.dumps(data)
return json.dumps(data).encode("utf-8")
return data


Expand Down

0 comments on commit 827f08a

Please sign in to comment.