This is an automated email from the ASF dual-hosted git repository.

lynwee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 502ef1de6 fix: incorrect datetime value: '0000-00-00' for column 
latest_updated… (#6541)
502ef1de6 is described below

commit 502ef1de691cb8b6ad9909146ef90735f58ed1f1
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

Reply via email to