diff options
author | Morlinest <Morlinest@users.noreply.github.com> | 2017-10-02 22:22:25 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-10-02 23:22:25 +0300 |
commit | a04718a2a6c2cfd46be17572b8220ee14b1bd1ac (patch) | |
tree | 017e127de6475b5d28c5e6ee5c8eb9123377135f /models/repo.go | |
parent | 46cc45f04967ac4e258daafb98a716bc5ac77a94 (diff) | |
download | gitea-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.go | 4 |
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, }) } |