diff options
Diffstat (limited to 'models/org_team.go')
-rw-r--r-- | models/org_team.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/org_team.go b/models/org_team.go index 3d4a2882c7..7eac0f7bc5 100644 --- a/models/org_team.go +++ b/models/org_team.go @@ -114,6 +114,14 @@ func SearchTeam(opts *SearchTeamOptions) ([]*Team, int64, error) { // ColorFormat provides a basic color format for a Team func (t *Team) ColorFormat(s fmt.State) { + if t == nil { + log.ColorFprintf(s, "%d:%s (OrgID: %d) %-v", + log.NewColoredIDValue(0), + "<nil>", + log.NewColoredIDValue(0), + 0) + return + } log.ColorFprintf(s, "%d:%s (OrgID: %d) %-v", log.NewColoredIDValue(t.ID), t.Name, |