diff --git a/lib/tasks/commit_log_to_db.rake b/lib/tasks/commit_log_to_db.rake index 9f445aa18..add783018 100644 --- a/lib/tasks/commit_log_to_db.rake +++ b/lib/tasks/commit_log_to_db.rake @@ -13,6 +13,7 @@ namespace :commit_log_to_db do # projects = Project.where(id: [5533,2,5971,299,1707,4418,1673,290,17,29,907,956,162,950]) projects = Project.where("id < 6200").where("id not in(5533,2,5971,299,1707,4418,1673,290,17,29,907,956,162,950)").where("project_type !=2") projects.each_with_index do |project, index| + next if project.owner.nil? result = Gitea::Repository::Commits::ListService.call(project.owner.login,project.identifier,sha: "", page: 1, limit: 200, token: project.owner.gitea_token) next if result.blank? || result[:total_count].blank? total_count = result[:total_count]