fix(project): load full project after creating a project
continuous-integration/drone/push Build is failing Details

When a new project was created, it contained all details already. This led to duplicated views and overridden attributes in the response.

Resolves #2242
This commit is contained in:
kolaente 2024-03-29 19:28:17 +01:00
parent 89e37b88d9
commit 81fe8391e4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 1 deletions

View File

@ -991,7 +991,12 @@ func (p *Project) Create(s *xorm.Session, a web.Auth) (err error) {
return
}
return p.ReadOne(s, a)
fullProject, err := GetProjectSimpleByID(s, p.ID)
if err != nil {
return
}
return fullProject.ReadOne(s, a)
}
func (p *Project) isDefaultProject(s *xorm.Session) (is bool, err error) {