Skip to content

Commit dac0835

Browse files
committed
fix: allow None in transform_year
1 parent 60f3d98 commit dac0835

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

features/verification.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,12 @@ async def resend_code(self, login: str, inter: disnake.ApplicationCommandInterac
185185
await self.gen_code_and_send_mail(inter, user, mail_postfix, True)
186186

187187
@staticmethod
188-
def transform_year(raw_year: str):
188+
def transform_year(raw_year: str | None):
189189
"""Parses year string originally from /etc/passwd into a role name"""
190190

191+
if raw_year is None:
192+
return None
193+
191194
if raw_year.lower() == "exstudent":
192195
return "ExStudent"
193196

0 commit comments

Comments
 (0)