mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 14:08:01 +02:00
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user