fix: Remove transaction block.

This commit is contained in:
2025-09-02 08:57:04 +10:00
parent 4653689e5e
commit ce46bd49fe

View File

@@ -41,9 +41,7 @@ class ProfilesComponent(cmds.Component):
Fetch or create the profile for the given user. Fetch or create the profile for the given user.
""" """
userid = str(user.id) userid = str(user.id)
async with self.bot.dbconn.connection() as conn: # TODO: Transaction
self.bot.dbconn.conn = conn
async with conn.transaction():
profile = await self.profiles.get_profile_twitch(userid) profile = await self.profiles.get_profile_twitch(userid)
if profile is None: if profile is None:
args = {} args = {}
@@ -70,9 +68,7 @@ class ProfilesComponent(cmds.Component):
Fetch or create the community for this channel. Fetch or create the community for this channel.
""" """
chanid = channel.id chanid = channel.id
async with self.bot.dbconn.connection() as conn: # TODO: Transaction
self.bot.dbconn.conn = conn
async with conn.transaction():
comm = await self.profiles.get_community_twitch(chanid) comm = await self.profiles.get_community_twitch(chanid)
if comm is None: if comm is None:
comm = await Community.create() comm = await Community.create()