Skip to content
Snippets Groups Projects
Commit 15afbeff authored by Rawel's avatar Rawel
Browse files

Only save the relation if a commit is found

parent 82cebdc9
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,8 @@ def run_worker(chunk: list[dict]):
commit_utils = CommitUtils(False, repo_node, None)
# We do not need to fetch by remote since the heuristic only uses local commits
commit = commit_utils.get_commit_by_sha(most_blamed_commit, False)
if commit:
# Only save the commit if it is found in the repository
db_repo.save_commit(commit, mapping["vcc_config_code"])
db_repo.update_vcc_fixing_commit(
mapping["mapping_id"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment