From 78b8b637742ee72775c37d60a94731047bd257f9 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 22 Apr 2016 18:36:05 -0400 Subject: #2992 set default style name when empty in AfterSet --- models/repo.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'models') diff --git a/models/repo.go b/models/repo.go index 8820293e5b..1715067df9 100644 --- a/models/repo.go +++ b/models/repo.go @@ -206,6 +206,10 @@ func (repo *Repository) AfterSet(colName string, _ xorm.Cell) { repo.NumOpenPulls = repo.NumPulls - repo.NumClosedPulls case "num_closed_milestones": repo.NumOpenMilestones = repo.NumMilestones - repo.NumClosedMilestones + case "external_tracker_style": + if len(repo.ExternalTrackerStyle) == 0 { + repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC + } case "created_unix": repo.Created = time.Unix(repo.CreatedUnix, 0).Local() case "updated_unix": -- cgit v1.2.3