From 7a5265aace63c524f5ba45f79db0a63e73831874 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Wed, 3 May 2023 09:58:40 -0700 Subject: [PATCH] chore: fix warnings with old locator properties asset_index.html.py:175: DeprecationWarning: Name is no longer supported as a property of Locators. Please use the block_id property. __M_writer(js_escaped_string(context_course.location.name )) asset_index.html.py:183: DeprecationWarning: Revision is no longer supported as a property of Locators. Please use the branch property. __M_writer(js_escaped_string(context_course.location.revision )) container.html.py:387: DeprecationWarning: Name is no longer supported as a property of Locators. Please use the block_id property. __M_writer(js_escaped_string(context_course.location.name )) container.html.py:395: DeprecationWarning: Revision is no longer supported as a property of Locators. Please use the branch property. __M_writer(js_escaped_string(context_course.location.revision )) course_outline.html.py:417: DeprecationWarning: Name is no longer supported as a property of Locators. Please use the block_id property. __M_writer(js_escaped_string(context_course.location.name )) course_outline.html.py:425: DeprecationWarning: Revision is no longer supported as a property of Locators. Please use the branch property. __M_writer(js_escaped_string(context_course.location.revision )) --- cms/templates/asset_index.html | 4 ++-- cms/templates/course_outline.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index 44fe759cda..728ee864c6 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -39,11 +39,11 @@ "course": { "id": "${context_course.id | n, js_escaped_string}", "name": "${context_course.display_name_with_default | n, js_escaped_string}", - "url_name": "${context_course.location.name | n, js_escaped_string}", + "url_name": "${context_course.location.block_id | n, js_escaped_string}", "org": "${context_course.location.org | n, js_escaped_string}", "num": "${context_course.location.course | n, js_escaped_string}", "display_course_number": "${context_course.display_coursenumber | n, js_escaped_string}", - "revision": "${context_course.location.revision | n, js_escaped_string}" + "revision": "${context_course.location.branch | n, js_escaped_string}" }, "help_tokens": { "files": "${get_online_help_info(online_help_token())['doc_url'] | n, js_escaped_string}" diff --git a/cms/templates/course_outline.html b/cms/templates/course_outline.html index 4e6dbfbcef..fd68ad9cd4 100644 --- a/cms/templates/course_outline.html +++ b/cms/templates/course_outline.html @@ -252,11 +252,11 @@ from django.urls import reverse "name": "${context_course.display_name_with_default | n, js_escaped_string}", "course_release_date": "${course_release_date | n, js_escaped_string}", "is_course_self_paced": ${context_course.self_paced | n, dump_js_escaped_json}, - "url_name": "${context_course.location.name | n, js_escaped_string}", + "url_name": "${context_course.location.block_id | n, js_escaped_string}", "org": "${context_course.location.org | n, js_escaped_string}", "num": "${context_course.location.course | n, js_escaped_string}", "display_course_number": "${context_course.display_coursenumber | n, js_escaped_string}", - "revision": "${context_course.location.revision | n, js_escaped_string}" + "revision": "${context_course.location.branch | n, js_escaped_string}" }, "help_tokens": { "files": "${get_online_help_info(online_help_token())['doc_url'] | n, js_escaped_string}"