Skip to content

Commit c47c369

Browse files
authored
Merge pull request #1114 from uw-it-aca/task/archived-course-names
Task/archived course names
2 parents 8cfe72f + 03a21fb commit c47c369

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sis_provisioner/management/commands/update_course_titles.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@ def handle(self, *args, **options):
5959
continue
6060

6161
course_id = row[canvas_course_id_idx]
62-
long_name = row[long_name_idx].removeprefix(pretext)
63-
short_name = row[short_name_idx].removeprefix(pretext)
62+
long_name = row[long_name_idx]
63+
short_name = row[short_name_idx]
64+
65+
if (long_name.startswith(pretext) and
66+
short_name.startswith(pretext)):
67+
continue
68+
6469
new_long_name = f"{pretext}{long_name}"
6570
new_short_name = f"{pretext}{short_name}"
6671

0 commit comments

Comments
 (0)