Create new python file for handling sqlalchemy. Removes circular import.

This commit is contained in:
alwayscompiling
2022-12-01 22:58:39 -05:00
parent 58e616ea47
commit 02145ba244
11 changed files with 49 additions and 28 deletions
+2 -2
View File
@@ -10,7 +10,8 @@ import pandas as pd
from sqlalchemy import distinct, select
from sqlalchemy.orm import aliased
from highscores import Category, CategoryGroup, Guild, Score, engine, session
# pylint: disable=import-error
from utilities.sql_alchemy_connection import Category, CategoryGroup, Guild, Score, engine, session
MAX_LINE_LENGTH = 142
@@ -336,7 +337,6 @@ async def submit_score(
group = session.scalar(stmt)
# edit message
print(f"Editting message {group.MessageId}")
channel = interaction.guild.get_channel(group.ChannelId)
error_response = "Registered Highscores channel does not exist or was never registered."