Skip to content

Commit

Permalink
A quick fix until we remove the column from the database
Browse files Browse the repository at this point in the history
  • Loading branch information
49Indium committed Nov 29, 2024
1 parent d63fa84 commit 276faf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions uqcsbot/advent.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ async def register_command(self, interaction: discord.Interaction, aoc_name: str
)
return

db_session.add(AOCRegistrations(aoc_userid=AOC_id, discord_userid=discord_id))
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 +674,7 @@ async def register_admin_command(
)
return

db_session.add(AOCRegistrations(aoc_userid=aoc_id, discord_userid=discord_id))
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
2 changes: 1 addition & 1 deletion uqcsbot/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ 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

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

0 comments on commit 276faf3

Please sign in to comment.