From 0db6adb1698507d3c92b177b30554f7ce204f99e Mon Sep 17 00:00:00 2001 From: John McCann Cunniff Jr Date: Thu, 19 Oct 2023 15:45:20 -0400 Subject: [PATCH] FIX handle none in template --- api/anubis/views/admin/assignments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/anubis/views/admin/assignments.py b/api/anubis/views/admin/assignments.py index 57ca281c2..84a501b24 100644 --- a/api/anubis/views/admin/assignments.py +++ b/api/anubis/views/admin/assignments.py @@ -413,7 +413,7 @@ def admin_assignments_save(assignment: dict): value = dateparse(value.replace("T", " ").replace("Z", "")).replace(microsecond=0) # If github.com is in what the user gave, remove it - if key in {"github_template", "shell_assignment_repo"} and value.startswith("https://github.com/"): + if key in {"github_template", "shell_assignment_repo"} and isinstance(value, str) and value.startswith("https://github.com/"): value = value.removeprefix('https://github.com/') if key == "theia_image":