diff --git a/discordbot/titanembeds/database/__init__.py b/discordbot/titanembeds/database/__init__.py index 1a0c314..eb3af33 100644 --- a/discordbot/titanembeds/database/__init__.py +++ b/discordbot/titanembeds/database/__init__.py @@ -34,10 +34,11 @@ class DatabaseInterface(object): session = Session() try: yield session + session.commit() except: session.rollback() finally: - session.commit() + session.close() async def push_message(self, message): if message.guild: