Skip to content

Commit

Permalink
fix parsing of SQL localized_string type
Browse files Browse the repository at this point in the history
fixes LIBERAPAYCOM-229
  • Loading branch information
Changaco committed Oct 16, 2023
1 parent 75b0123 commit 981d7d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liberapay/wireup.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def cast_localized_string(v, cursor):
if v in (None, '(,)'):
return None
else:
text, lang = v[1:-1].split(',')
text, lang = v[1:-1].rsplit(',', 1)
if text.startswith('"') and text.endswith('"'):
text = text[1:-1].replace('""', '"')
return LocalizedString(text, lang)
Expand Down

0 comments on commit 981d7d5

Please sign in to comment.