generated from coulomb/repo-seed
Candidate support/evidence acceptance
This commit is contained in:
@@ -677,6 +677,29 @@ class RegistryStore:
|
||||
f"{repository_id} analysis run {analysis_run_id}"
|
||||
)
|
||||
|
||||
def mark_candidate_evidence_status(
|
||||
self,
|
||||
repository_id: int,
|
||||
analysis_run_id: int,
|
||||
candidate_evidence_id: int,
|
||||
status: str,
|
||||
) -> None:
|
||||
with self.connect() as connection:
|
||||
cursor = connection.execute(
|
||||
"""
|
||||
UPDATE candidate_evidence
|
||||
SET status = ?
|
||||
WHERE id = ? AND repository_id = ? AND analysis_run_id = ?
|
||||
""",
|
||||
(status, candidate_evidence_id, repository_id, analysis_run_id),
|
||||
)
|
||||
if cursor.rowcount == 0:
|
||||
raise NotFoundError(
|
||||
"candidate evidence "
|
||||
f"{candidate_evidence_id} was not found for repository "
|
||||
f"{repository_id} analysis run {analysis_run_id}"
|
||||
)
|
||||
|
||||
def _mark_candidate_children_status(
|
||||
self,
|
||||
connection: sqlite3.Connection,
|
||||
|
||||
Reference in New Issue
Block a user