🚧 Update the data types of the user_qq and group_id fields to str

This commit is contained in:
yajiwa
2023-04-14 15:47:53 +08:00
parent 0eeb55a0ca
commit c577aa1318
21 changed files with 39 additions and 39 deletions
+2 -2
View File
@@ -56,12 +56,12 @@ async def _(parma: HandleRequest) -> Result:
if parma.type == "group":
if rid := requests_manager.get_group_id(parma.id):
# await GroupInfo.update_or_create(defaults={"group_flag": 1}, )
if group := await GroupInfo.get_or_none(group_id=rid):
if group := await GroupInfo.get_or_none(group_id=str(rid)):
await group.update_or_create(group_flag=1)
else:
group_info = await bot.get_group_info(group_id=rid)
await GroupInfo.update_or_create(
group_id=group_info["group_id"],
group_id=str(group_info["group_id"]),
defaults={
"group_name": group_info["group_name"],
"max_member_count": group_info["max_member_count"],