mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix TypeError
exception caused by data
is None
This commit is contained in:
parent
1f1734ca03
commit
a2c2087162
@ -116,6 +116,9 @@ class CharacterDetails(Plugin):
|
|||||||
logger.warning("非法Key %s", key)
|
logger.warning("非法Key %s", key)
|
||||||
continue
|
continue
|
||||||
data = await self.redis.get(key)
|
data = await self.redis.get(key)
|
||||||
|
if data is None:
|
||||||
|
logger.warning("Redis key[%s] 数据未找到", key) # 如果未找到可能因为处理过程中已经过期,导致该数据未回写到 MySQL
|
||||||
|
continue
|
||||||
str_data = str(data, encoding="utf-8")
|
str_data = str(data, encoding="utf-8")
|
||||||
async with AsyncSession(self.mysql.engine) as session:
|
async with AsyncSession(self.mysql.engine) as session:
|
||||||
statement = (
|
statement = (
|
||||||
|
Loading…
Reference in New Issue
Block a user