@@ -149,7 +149,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
149149 units = append (units , models.RepoUnit {
150150 RepoID : repo .ID ,
151151 Type : tp ,
152- Index : int (tp ),
153152 Config : new (models.UnitConfig ),
154153 })
155154 }
@@ -165,7 +164,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
165164 units = append (units , models.RepoUnit {
166165 RepoID : repo .ID ,
167166 Type : models .UnitTypeExternalWiki ,
168- Index : int (models .UnitTypeExternalWiki ),
169167 Config : & models.ExternalWikiConfig {
170168 ExternalWikiURL : form .ExternalWikiURL ,
171169 },
@@ -174,7 +172,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
174172 units = append (units , models.RepoUnit {
175173 RepoID : repo .ID ,
176174 Type : models .UnitTypeWiki ,
177- Index : int (models .UnitTypeWiki ),
178175 Config : new (models.UnitConfig ),
179176 })
180177 }
@@ -190,7 +187,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
190187 units = append (units , models.RepoUnit {
191188 RepoID : repo .ID ,
192189 Type : models .UnitTypeExternalTracker ,
193- Index : int (models .UnitTypeExternalTracker ),
194190 Config : & models.ExternalTrackerConfig {
195191 ExternalTrackerURL : form .ExternalTrackerURL ,
196192 ExternalTrackerFormat : form .TrackerURLFormat ,
@@ -201,7 +197,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
201197 units = append (units , models.RepoUnit {
202198 RepoID : repo .ID ,
203199 Type : models .UnitTypeIssues ,
204- Index : int (models .UnitTypeIssues ),
205200 Config : & models.IssuesConfig {
206201 EnableTimetracker : form .EnableTimetracker ,
207202 AllowOnlyContributorsToTrackTime : form .AllowOnlyContributorsToTrackTime ,
@@ -214,7 +209,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
214209 units = append (units , models.RepoUnit {
215210 RepoID : repo .ID ,
216211 Type : models .UnitTypePullRequests ,
217- Index : int (models .UnitTypePullRequests ),
218212 Config : new (models.UnitConfig ),
219213 })
220214 }
0 commit comments