Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Fix for unicode support in user data, in migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
xabiugarte committed Feb 28, 2019
1 parent 01c5aaf commit 8ad31bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/utilities/migrate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def main(prefix):
with open(os.path.join(prefix, "User"), "w") as f_out:
for l in f:
d = json.loads(l.strip())
f_out.write("0|%s|%s|%s|%d|%s|%s|%d|%d|%s|%s\n" % (d['name'],
f_out.write(("0|%s|%s|%s|%d|%s|%s|%d|%d|%s|%s\n" % (d['name'],
d['email'],
d['handle'],
d['number'],
Expand All @@ -45,7 +45,7 @@ def main(prefix):
int(d['rank']['$numberLong']),
1 if d['active'] else 0,
d['service'],
d['auth_data']))
d['auth_data'])).encode('UTF-8'))
user_ids[d["_id"]["$oid"]] = user_id_counter
user_id_counter += 1

Expand Down

0 comments on commit 8ad31bc

Please sign in to comment.