Skip to content

Commit

Permalink
fix verify for fit employees
Browse files Browse the repository at this point in the history
  • Loading branch information
solumath committed Aug 16, 2024
1 parent cbbb4bb commit 1ead527
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion features/verify_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ async def _parse_relation(self, user: dict) -> str | None:
"""Parse user relations and return year, programee and faculty for students,
`employee` for FIT employees, None for others."""
ret = None # rule out students that are also employees or have multiple studies
relation: dict
for relation in user["vztahy"]:
# student
if "rok_studia" in relation.keys():
Expand All @@ -57,7 +58,7 @@ async def _parse_relation(self, user: dict) -> str | None:
# do not return yet if not FIT, check for all relations if student has multiple studies
if relation["fakulta"]["zkratka"] == "FIT":
return ret
elif "ustav" in relation.keys() and relation["ustav"]["fakulta"]["zkratka"] == "FIT":
elif "fakulta" in relation.keys() and relation["fakulta"]["zkratka"] == "FIT":
# FIT employee, replace only if not student
ret = ret or "employee"
if not ret:
Expand Down

0 comments on commit 1ead527

Please sign in to comment.