From eb5ba0f87ddcdf413afff24e63a078871b837de5 Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Thu, 28 Aug 2025 23:13:06 +0530 Subject: [PATCH] fix: exception while trying to check sync status of deleted upstream (#37298) Use `Upstream.try_get_for_block` instead of `Upstream.get_for_block` which raises `BadUpstream` if upstream block is deleted. --- cms/lib/xblock/upstream_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/lib/xblock/upstream_sync.py b/cms/lib/xblock/upstream_sync.py index 484e75b10a..1b78b6b366 100644 --- a/cms/lib/xblock/upstream_sync.py +++ b/cms/lib/xblock/upstream_sync.py @@ -125,7 +125,7 @@ class UpstreamLink: for child in downstream_children: if child.upstream: - child_upstream_link = UpstreamLink.get_for_block(child) + child_upstream_link = UpstreamLink.try_get_for_block(child) child_ready_to_sync = bool( child_upstream_link.upstream_ref and