Update README-zh-Hans.md

pull/680/head
Vardhaman 2022-06-07 09:39:33 +05:30 committed by GitHub
parent fb723c2358
commit 9aa0a4eaea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1181,7 +1181,7 @@ def get_user(self, user_id):
if user is None: if user is None:
user = db.query("SELECT * FROM users WHERE user_id = {0}", user_id) user = db.query("SELECT * FROM users WHERE user_id = {0}", user_id)
if user is not None: if user is not None:
key = "user.{0}".format(user_id) key = f"user.{user_id}"
cache.set(key, json.dumps(user)) cache.set(key, json.dumps(user))
return user return user
``` ```