diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index b7689a21a0f9..9c9926a5b25d 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -28,7 +28,6 @@ from xmodule.x_module import AUTHOR_VIEW, PREVIEW_VIEWS, STUDENT_VIEW, XModuleMixin from cms.djangoapps.xblock_config.models import StudioConfig from cms.djangoapps.contentstore.toggles import individualize_anonymous_user_id -from cms.djangoapps.contentstore.utils import get_course_authoring_url from cms.lib.xblock.field_data import CmsFieldData from common.djangoapps.static_replace.services import ReplaceURLService from common.djangoapps.static_replace.wrapper import replace_urls_wrapper diff --git a/cms/static/js/views/course_outline.js b/cms/static/js/views/course_outline.js index 286b587209b4..dfc95e739974 100644 --- a/cms/static/js/views/course_outline.js +++ b/cms/static/js/views/course_outline.js @@ -28,15 +28,17 @@ function( this.makeContentDraggable(this.el); // Show/hide the paste button this.initializePasteButton(this.el); - //this.renderTagCount(); + this.renderTagCount(); return renderResult; }, renderTagCount: function() { const contentId = this.model.get('id'); + const tagCountsByUnit = this.model.get('tag_counts_by_unit') + const tagsCount = tagCountsByUnit !== undefined ? tagCountsByUnit[contentId] : 0 var countModel = new TagCountModel({ content_id: contentId, - tags_count: this.model.get('tag_counts_by_unit')[contentId], + tags_count: tagsCount, course_authoring_url: this.model.get('course_authoring_url'), }, {parse: true}); var tagCountView = new TagCountView({el: this.$('.tag-count'), model: countModel});