Skip to content

Commit

Permalink
🐛 update migrate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Jan 10, 2024
1 parent e7e7bdb commit c93f648
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand All @@ -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()
Expand Down

0 comments on commit c93f648

Please sign in to comment.