Skip to content

Commit

Permalink
fix: fix the error if the class hasn't started yet
Browse files Browse the repository at this point in the history
  • Loading branch information
itsHenry35 committed Nov 3, 2023
1 parent 3acd0e1 commit 4eb62fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gui/download2.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def get_lecturers(course_list, user_id, access_token):
}
response = requests.get(url, headers=headers)
lecturers_data = response.json()
if lecturers_data == []:
return []
class_id = lecturers_data[0]['stdClassId']
subject_id = lecturers_data[0]['stdSubject']
lecturer_id = lecturers_data[0]['lecturerId']
Expand Down

0 comments on commit 4eb62fb

Please sign in to comment.