Skip to content

Commit bda33de

Browse files
committed
changed from hard to soft language change
1 parent e14801d commit bda33de

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

microsetta_private_api/api/_account.py

-6
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,6 @@ def register_account(body, token_info):
101101

102102
def read_account(account_id, token_info):
103103
acc = _validate_account_access(token_info, account_id)
104-
if acc.language == "ja_JP":
105-
with Transaction() as t:
106-
acct_repo = AccountRepo(t)
107-
acc.language = "en_US"
108-
acct_repo.update_account(acc)
109-
t.commit()
110104
return jsonify(acc.to_api()), 200
111105

112106

microsetta_private_api/model/account.py

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ def __init__(self, account_id, email,
6161
self.creation_time = creation_time
6262
self.update_time = update_time
6363
self.language = language
64+
if (self.language == "ja_JP"):
65+
self.language = "en_US"
66+
language = self.language
6467
self.consent_privacy_terms = consent_privacy_terms
6568

6669
def to_api(self):

0 commit comments

Comments
 (0)