Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Fix db convert error
Browse files Browse the repository at this point in the history
  • Loading branch information
a76yyyy committed Sep 2, 2022
1 parent 5493b93 commit 9f5c7ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/db_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ async def ConvertNewType(self, db=DB(), path=config.sqlite3.path):
from db import User, Task, Tpl
conn = await aiosqlite.connect(f"{config.sqlite3.path}")
conn.text_factory = bytes
cursor = await conn.execute('SELECT id, password, userkey, cip, mip, aip FROM user')
cursor = await conn.execute('SELECT id, password, userkey FROM user')
for row in await cursor.fetchall():
result = await self.db._update(update(User).where(User.id == row[0]).values(password=row[1],userkey=row[2],cip=row[3],mip=row[4],aip=row[5]))
result = await self.db._update(update(User).where(User.id == row[0]).values(password=row[1],userkey=row[2]))
await cursor.close()

cursor = await conn.execute('SELECT id, init_env, env, session FROM task')
Expand Down

0 comments on commit 9f5c7ac

Please sign in to comment.