Skip to content

Commit

Permalink
Allow json to store the text in the database without replacing the no…
Browse files Browse the repository at this point in the history
…n-Ascii characters with Unicode alternatives
  • Loading branch information
khashashin authored Mar 7, 2024
1 parent e882c24 commit 7766da0
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 7766da0

Please sign in to comment.