fix(server): prevent adding logs to non-existent repo
This commit is contained in:
parent
139142fcec
commit
f42d3fd8b0
2 changed files with 13 additions and 5 deletions
|
|
@ -152,3 +152,11 @@ pub fn (db &VieterDb) update_git_repo_archs(repo_id int, archs []GitRepoArch) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn (db &VieterDb) git_repo_exists(repo_id int) bool {
|
||||
db.get_git_repo(repo_id) or {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue