Skip to content

Commit 708e043

Browse files
feat: record reason for automatic rejection
1 parent 7fdcf76 commit 708e043

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/shared/listeners/automatic_linkage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def build_new_links(container: Container) -> bool:
113113
CVEDerivationClusterProposal.objects.create(
114114
cve=container.cve,
115115
status=CVEDerivationClusterProposal.Status.REJECTED,
116+
rejection_reason=CVEDerivationClusterProposal.RejectionReason.EXCLUSIVELY_HOSTED_SERVICE,
116117
)
117118
return True
118119

src/shared/tests/test_linkage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,8 @@ def test_exclusively_hosted_service_creates_rejected_proposal(
138138
assert result is True
139139
proposal = CVEDerivationClusterProposal.objects.get(cve=container.cve)
140140
assert proposal.status == CVEDerivationClusterProposal.Status.REJECTED
141+
assert (
142+
proposal.rejection_reason
143+
== CVEDerivationClusterProposal.RejectionReason.EXCLUSIVELY_HOSTED_SERVICE
144+
)
141145
assert proposal.derivations.count() == 0

0 commit comments

Comments
 (0)