Fixed account linking when creating new systems on import

This commit is contained in:
Ske 2018-07-31 01:50:11 +02:00
parent 18dff93edd
commit e831ef5921

View File

@ -101,7 +101,7 @@ async def import_tupperware(ctx: CommandContext, args: List[str]):
hid = utils.generate_hid() hid = utils.generate_hid()
logger.debug("Creating new system (hid={})...".format(hid)) logger.debug("Creating new system (hid={})...".format(hid))
system = await db.create_system(ctx.conn, system_name=None, system_hid=hid) system = await db.create_system(ctx.conn, system_name=None, system_hid=hid)
await db.link_account(ctx.conn, system_id=system["id"], account_id=ctx.message.author.id) await db.link_account(ctx.conn, system_id=system.id, account_id=ctx.message.author.id)
for embed in embeds: for embed in embeds:
for field in embed["fields"]: for field in embed["fields"]: