From c93f6484fe515baef56bbf63ad2d44ba3ec5ee14 Mon Sep 17 00:00:00 2001 From: RF-Tar-Railt <3165388245@qq.com> Date: Wed, 10 Jan 2024 11:49:59 +0800 Subject: [PATCH] :bug: update migrate.py --- migrate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migrate.py b/migrate.py index 630acbc..785ca34 100644 --- a/migrate.py +++ b/migrate.py @@ -75,6 +75,8 @@ async def main(): else: group.accounts = [*group.accounts, f"land(qq).account({dr.name})"] group.accounts = list(set(group.accounts)) + group.disabled.extend(["member_mute", "member_unmute"]) + group.disabled = list(set(group.disabled)) await session.merge(group) logger.info(f"migrating group {group_id} ...") if "weibo_followers" in data["additional"]: @@ -92,7 +94,7 @@ async def main(): user = User(id=user_id, trust=data["trust"]) await session.merge(user) else: - user.trust = data["trust"] + user.trust = max(data["trust"], user.trust) await session.merge(user) logger.info(f"migrating user {user_id} ...") now = datetime.now()