fix: use integration_id
to get students' jAccount username (#22)
This commit is contained in:
parent
fb2b866667
commit
d56328ce4a
|
@ -68,9 +68,9 @@ class Gitea:
|
||||||
|
|
||||||
@lru_cache()
|
@lru_cache()
|
||||||
def _get_username_by_canvas_student(self, student: User) -> str:
|
def _get_username_by_canvas_student(self, student: User) -> str:
|
||||||
if student.email == None or student.email.find("@") == -1:
|
if student.integration_id is None:
|
||||||
raise Exception(f"{student} not found in Gitea")
|
raise Exception(f"{student} id not found in Gitea")
|
||||||
return student.email.split("@")[0]
|
return student.integration_id
|
||||||
|
|
||||||
def add_canvas_students_to_teams(
|
def add_canvas_students_to_teams(
|
||||||
self, students: PaginatedList, team_names: List[str]
|
self, students: PaginatedList, team_names: List[str]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user