We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e9791a + c7a9ff8 commit 11d343dCopy full SHA for 11d343d
microsetta_private_api/api/_account.py
@@ -124,6 +124,11 @@ def check_email_match(account_id, token_info):
124
def update_account(account_id, body, token_info):
125
acc = _validate_account_access(token_info, account_id)
126
127
+ # Prevent users outside Japan from selecting Japanese
128
+ if body['language'] == "ja_JP" and\
129
+ body['address']['country_code'] != "JP":
130
+ return jsonify(code=422, message="Invalid language selected"), 422
131
+
132
with Transaction() as t:
133
acct_repo = AccountRepo(t)
134
acc.first_name = body['first_name']
0 commit comments