Skip to content

Commit 5fe3d5f

Browse files
committed
Circumvent errors on course load on update_student_tags job
1 parent 0fe5552 commit 5fe3d5f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

feedback/tasks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ def update_student_tags(self): # pylint: disable=unused-argument
8585
continue
8686
# check if course is still in progress
8787
course_api = client.load_data(course.url)
88+
if course_api == None:
89+
logger.warning("Could not load course data for %s.", course)
90+
continue
8891
course_end = datetime.fromisoformat(course_api.get("ending_time"))
8992
if datetime.now(timezone.utc) < course_end:
9093
# update tags

0 commit comments

Comments
 (0)