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

mappjzc 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 affec7c9a fix: fix rename create the new project (#4078)
affec7c9a is described below

commit affec7c9a54bbd95fb1e64d3a505ffb4f4d4bba0
Author: mappjzc <[email protected]>
AuthorDate: Fri Dec 30 20:51:51 2022 +0800

    fix: fix rename create the new project (#4078)
    
    fix rename create the new project
    
    Nddtfjiang <[email protected]>
---
 services/project.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/services/project.go b/services/project.go
index 96be27e0a..cf1453532 100644
--- a/services/project.go
+++ b/services/project.go
@@ -213,6 +213,13 @@ func PatchProject(name string, body 
map[string]interface{}) (*models.ApiOutputPr
                if err != nil {
                        return nil, err
                }
+
+               // rename project
+               err = tx.UpdateColumn(
+                       &models.Project{},
+                       "name", project.Name,
+                       dal.Where("name = ?", name),
+               )
        }
 
        // Blueprint

Reply via email to