From 6c54c8fd15f9211bef249874a6bc89098dc96af0 Mon Sep 17 00:00:00 2001 From: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:04:16 -0400 Subject: [PATCH] fix: infinite load for library content block view (#34412) * fix: hide view button when block is not configured * fix: remove script for load timer if no children or library * fix: remove print message * fix: NoneType error is tests --- cms/templates/studio_xblock_wrapper.html | 3 ++- xmodule/library_content_block.py | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cms/templates/studio_xblock_wrapper.html b/cms/templates/studio_xblock_wrapper.html index 9ae3a3a5dd..b2fc928f42 100644 --- a/cms/templates/studio_xblock_wrapper.html +++ b/cms/templates/studio_xblock_wrapper.html @@ -20,6 +20,7 @@ show_inline = xblock.has_children and not xblock_url section_class = "level-nesting" if show_inline else "level-element" label = determine_label(xblock.display_name_with_default, xblock.scope_ids.block_type) messages = xblock.validate().to_json() +has_not_configured_message = messages.get('summary',{}).get('type', None) == 'not-configured' block_is_unit = is_unit(xblock) %> @@ -190,7 +191,7 @@ block_is_unit = is_unit(xblock) % if not is_root:
- % if xblock_url: + % if xblock_url and not has_not_configured_message:
${_('This block contains multiple components.')}