summaryrefslogtreecommitdiffstats
path: root/models/repo/repo_unit.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/repo_unit.go')
-rw-r--r--models/repo/repo_unit.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo/repo_unit.go b/models/repo/repo_unit.go
index 37f1c70545..4c87f017b3 100644
--- a/models/repo/repo_unit.go
+++ b/models/repo/repo_unit.go
@@ -173,8 +173,6 @@ func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell) {
switch colName {
case "type":
switch unit.Type(db.Cell2Int64(val)) {
- case unit.TypeCode, unit.TypeReleases, unit.TypeWiki, unit.TypeProjects:
- r.Config = new(UnitConfig)
case unit.TypeExternalWiki:
r.Config = new(ExternalWikiConfig)
case unit.TypeExternalTracker:
@@ -183,8 +181,10 @@ func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell) {
r.Config = new(PullRequestsConfig)
case unit.TypeIssues:
r.Config = new(IssuesConfig)
+ case unit.TypeCode, unit.TypeReleases, unit.TypeWiki, unit.TypeProjects:
+ fallthrough
default:
- panic(fmt.Sprintf("unrecognized repo unit type: %v", *val))
+ r.Config = new(UnitConfig)
}
}
}