forked from forgejo/forgejo
parent
46cc45f049
commit
a04718a2a6
6 changed files with 33 additions and 22 deletions
|
@ -1245,19 +1245,17 @@ func createRepository(e *xorm.Session, doer, u *User, repo *Repository) (err err
|
|||
|
||||
// insert units for repo
|
||||
var units = make([]RepoUnit, 0, len(defaultRepoUnits))
|
||||
for i, tp := range defaultRepoUnits {
|
||||
for _, tp := range defaultRepoUnits {
|
||||
if tp == UnitTypeIssues {
|
||||
units = append(units, RepoUnit{
|
||||
RepoID: repo.ID,
|
||||
Type: tp,
|
||||
Index: i,
|
||||
Config: &IssuesConfig{EnableTimetracker: setting.Service.DefaultEnableTimetracking, AllowOnlyContributorsToTrackTime: setting.Service.DefaultAllowOnlyContributorsToTrackTime},
|
||||
})
|
||||
} else {
|
||||
units = append(units, RepoUnit{
|
||||
RepoID: repo.ID,
|
||||
Type: tp,
|
||||
Index: i,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue