Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
49Indium committed Nov 29, 2024
1 parent 276faf3 commit 07d97fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions uqcsbot/advent.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,9 @@ async def register_command(self, interaction: discord.Interaction, aoc_name: str
)
return

db_session.add(AOCRegistrations(aoc_userid=AOC_id, discord_userid=discord_id, year=2024)) # this is a quick fix unitl we drop the column in the database
db_session.add(
AOCRegistrations(aoc_userid=AOC_id, discord_userid=discord_id, year=2024)
) # this is a quick fix unitl we drop the column in the database
db_session.commit()
db_session.close()

Expand Down Expand Up @@ -674,7 +676,9 @@ async def register_admin_command(
)
return

db_session.add(AOCRegistrations(aoc_userid=aoc_id, discord_userid=discord_id, year=2024)) # this is a quick fix unitl we drop the column in the database
db_session.add(
AOCRegistrations(aoc_userid=aoc_id, discord_userid=discord_id, year=2024)
) # this is a quick fix unitl we drop the column in the database
db_session.commit()
db_session.close()

Expand Down
5 changes: 4 additions & 1 deletion uqcsbot/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ class AOCRegistrations(Base):
"discord_userid", BigInteger, primary_key=True, nullable=False
)
aoc_userid: Mapped[int] = mapped_column("aoc_userid", Integer, nullable=False)
year: Mapped[int] = mapped_column("year", Integer, nullable=False) # Try to remove this column from the database at some point
year: Mapped[int] = mapped_column(
"year", Integer, nullable=False
) # Try to remove this column from the database at some point


class MCWhitelist(Base):
__tablename__ = "mc_whitelisted"
Expand Down

0 comments on commit 07d97fa

Please sign in to comment.