Skip to content

Commit

Permalink
FIX handle none in template
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Oct 19, 2023
1 parent a885415 commit 0db6adb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/anubis/views/admin/assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 0db6adb

Please sign in to comment.