Skip to content

Commit

Permalink
Ensure that report histories can only be generated for users who have…
Browse files Browse the repository at this point in the history
… submitted at least one report
  • Loading branch information
cbrxyz committed May 26, 2024
1 parent 05dd083 commit 460e70a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,13 @@ async def callback(self, interaction: discord.Interaction):
interaction.user.name,
in_column=Column.DISCORD_NAME_COLUMN.value,
)
if name_cell is None:
await interaction.edit_original_response(
content="❌ We couldn't find your name in the main spreadsheet. Are you registered for EGN4912 and have you submitted a report this semester?",
attachments=[],
)
return

# Get all values for this member
row_values = await main_worksheet.row_values(name_cell.row)
# Iterate through week columns
Expand Down

0 comments on commit 460e70a

Please sign in to comment.