Update the verification view to use database.

This commit is contained in:
alwayscompiling
2022-11-30 22:58:27 -05:00
parent 4f255a32e2
commit 1fdb9ff1b6
2 changed files with 12 additions and 33 deletions
+2 -3
View File
@@ -193,10 +193,9 @@ class Submission:
embed = Embed(title="Highscores Submission", description=description)
embed.add_field(name="User Name", value=self.username, inline=False)
embed.add_field(name="Table", value=self.group_id, inline=False)
embed.add_field(name="GroupId", value=self.group_id, inline=False)
if self.category_id:
stmt = select(Category.CategoryName).where(Category.CategoryId == self.category_id)
embed.add_field(name="Category", value=session.scalar(stmt), inline=False)
embed.add_field(name="CategoryId", value=self.category_id, inline=False)
if self.score:
embed.add_field(name="Score", value=self.score, inline=False)
return embed