Skip to content

Commit a1bec4c

Browse files
authored
HOTFIX
/traps add did not work
1 parent b4cb3fe commit a1bec4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/greenieboard/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def on_submit(self, interaction: discord.Interaction, /) -> None:
4040
if self.case.value not in ['1', '2', '3']:
4141
raise TypeError(_('Case needs to be one of 1, 2 or 3.'))
4242
grade = self.grade.value.upper()
43-
if grade not in self.config['ratings'].keys():
43+
if grade not in self.config['grades'].keys():
4444
raise ValueError(_("Grade has to be one of {}.").format(
4545
', '.join([utils.escape_string(x) for x in self.config['ratings'].keys()])))
4646
if self.wire.value and self.wire.value not in ['1', '2', '3', '4']:
@@ -58,7 +58,7 @@ async def on_submit(self, interaction: discord.Interaction, /) -> None:
5858
trapcase)
5959
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
6060
""", (-1, ucid, self.unit_type, self.grade.value, self.comment.value, 'n/a', night,
61-
self.config['ratings'][grade], self.wire.value, self.case.value))
61+
self.config['grades'][grade]['rating'], self.wire.value, self.case.value))
6262
self.success = True
6363

6464
async def on_error(self, interaction: discord.Interaction, error: Exception) -> None:

0 commit comments

Comments
 (0)