You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/08/25 03:06:11 UTC
[incubator-devlake] branch release-v0.18 updated: fix: skip invalid account in case there were corruptted records in the db (#5952)
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.18
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.18 by this push:
new 2b2f4071f fix: skip invalid account in case there were corruptted records in the db (#5952)
2b2f4071f is described below
commit 2b2f4071f3112b42dff32829e99e5d26560a0a72
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Fri Aug 25 11:06:06 2023 +0800
fix: skip invalid account in case there were corruptted records in the db (#5952)
---
backend/plugins/github/tasks/account_org_collector.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/backend/plugins/github/tasks/account_org_collector.go b/backend/plugins/github/tasks/account_org_collector.go
index ae8c569ad..01c922ae2 100644
--- a/backend/plugins/github/tasks/account_org_collector.go
+++ b/backend/plugins/github/tasks/account_org_collector.go
@@ -48,7 +48,9 @@ func CollectAccountOrg(taskCtx plugin.SubTaskContext) errors.Error {
AND ga.id = _tool_github_repo_accounts.account_id
AND ga.type = 'User'
)`),
- dal.Where("_tool_github_repo_accounts.repo_github_id = ? and _tool_github_repo_accounts.connection_id=?",
+ dal.Where(`_tool_github_repo_accounts.repo_github_id = ?
+ AND _tool_github_repo_accounts.connection_id=?
+ AND _tool_github_repo_accounts.account_id > 0`,
data.Options.GithubId, data.Options.ConnectionId),
)
if err != nil {