summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorMorlinest <Morlinest@users.noreply.github.com>2017-10-02 22:22:25 +0200
committerLauris BH <lauris@nix.lv>2017-10-02 23:22:25 +0300
commita04718a2a6c2cfd46be17572b8220ee14b1bd1ac (patch)
tree017e127de6475b5d28c5e6ee5c8eb9123377135f /models/repo.go
parent46cc45f04967ac4e258daafb98a716bc5ac77a94 (diff)
downloadgitea-a04718a2a6c2cfd46be17572b8220ee14b1bd1ac.tar.gz
gitea-a04718a2a6c2cfd46be17572b8220ee14b1bd1ac.zip
Remove repo unit index (#2621)
* Remove repo unit index * Fix sqlite
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index 6b457863c8..e2714c74ca 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -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,
})
}