Skip to content

Commit ca34633

Browse files
committed
Drop an un-pinned repository from the scan's code section at once
Un-pinning a repository from a site left no clear sign it worked: the saved message sits at the top of the page while the code section is further down, and that section still listed the repository because it was read from the scan's stored matches. The code section now checks the current link, so a repository un-pinned since the scan drops straight out of the linked list and the un-pin prompt. Seeing it gone is the plain sign the un-pin took.
1 parent 635e0f3 commit ca34633

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎app/core/external.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,6 +3036,11 @@ def code_behind(db, user, scan: ExternalDastScan, asset: ExternalAsset) -> dict:
30363036
if rid not in visible:
30373037
continue
30383038
link = links.get(rid) or {}
3039+
# A repository un-pinned since the scan is no longer linked, so it drops
3040+
# out of here at once: the code section then shows straight away that it
3041+
# is gone, which is the plain sign that the un-pin took.
3042+
if not link.get("linked"):
3043+
continue
30393044
src = link.get("source") or ""
30403045
total = int(l.get("routes_total") or 0)
30413046
reached = int(l.get("routes_reached") or 0)

0 commit comments

Comments
 (0)