Skip to content

Commit

Permalink
fix incorrect type on ScorewatchRequest (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunyoku authored Dec 8, 2024
1 parent 77e8f94 commit 001b5de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def callback(self, interaction: discord.Interaction) -> None:
)
return None

if request_data["request_status"].value in Status.resolved_statuses():
if request_data["request_status"] in Status.resolved_statuses():
await interaction.followup.send(
"This request has already been resolved!",
ephemeral=True,
Expand Down
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def on_ready() -> None:
# Load views so the existing one will still work.
bot.add_view(views.ReportView(bot))
for sw_request in await sw_requests.fetch_all():
if sw_request["request_status"].value in Status.resolved_statuses():
if sw_request["request_status"] in Status.resolved_statuses():
continue # No point in adding already resolved requests perhaps threads are even gone by now.

bot.add_view(
Expand Down
3 changes: 1 addition & 2 deletions app/repositories/sw_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import TypedDict

from app import state
from app.constants import Status

READ_PARAMS = """\
request_id,
Expand All @@ -23,7 +22,7 @@ class ScorewatchRequest(TypedDict):
requested_by: int
score_id: int
score_relax: int
request_status: Status
request_status: str
thread_message_id: int
thread_id: int
created_at: datetime
Expand Down

0 comments on commit 001b5de

Please sign in to comment.