This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch release-v0.20-auto-cherry-pick-6541 in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit e09043da097c33b5848b21dfbbe1644f777a994c Author: abeizn <[email protected]> AuthorDate: Thu Nov 30 18:30:25 2023 +0800 fix: incorrect datetime value: '0000-00-00' for column latest_updated… (#6541) * fix: incorrect datetime value: '0000-00-00' for column latest_updated_date * fix: remove some code --- .../plugins/github_graphql/tasks/deployment_collector_extractor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go b/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go index fa8db34e4..ced50bf20 100644 --- a/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go +++ b/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go @@ -171,7 +171,9 @@ func convertGithubDeployment(deployment GraphqlQueryDeploymentDeployment, connec CreatedDate: deployment.CreatedAt, UpdatedDate: deployment.UpdatedAt, LatestStatusState: deployment.LatestStatus.State, - LatestUpdatedDate: deployment.LatestStatus.UpdatedAt, + } + if !deployment.LatestStatus.UpdatedAt.IsZero() { + ret.LatestUpdatedDate = deployment.LatestStatus.UpdatedAt } if deployment.Ref != nil { ret.RefName = deployment.Ref.Name
