Skip to content

Commit

Permalink
Merge pull request #50 from geoimpactag/fix-json-dumps-non-ascii-repl…
Browse files Browse the repository at this point in the history
…acement

Allow json to store the non ascii text in the database
  • Loading branch information
wardi authored Mar 11, 2024
2 parents e882c24 + 7766da0 commit c4e6dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/fluent/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def validator(key, data, errors, context):
errors[key].append(_('Required language "%s" missing') % lang)

if not errors[key]:
data[key] = json.dumps(value)
data[key] = json.dumps(value, ensure_ascii=False)
return

# 3. separate fields
Expand Down Expand Up @@ -157,7 +157,7 @@ def validator(key, data, errors, context):

for lang in output:
del extras[prefix + lang]
data[key] = json.dumps(output)
data[key] = json.dumps(output, ensure_ascii=False)

return validator

Expand Down

0 comments on commit c4e6dd8

Please # to comment.