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.
This commit is contained in:
Navin Karkera
2025-08-28 23:13:06 +05:30
committed by GitHub
parent 8085bf6be4
commit eb5ba0f87d

View File

@@ -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