summaryrefslogtreecommitdiffstats
path: root/modules/convert/convert.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/convert/convert.go')
-rw-r--r--modules/convert/convert.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go
index e81df0c0c3..5d056c3795 100644
--- a/modules/convert/convert.go
+++ b/modules/convert/convert.go
@@ -284,6 +284,10 @@ func ToOrganization(org *models.User) *api.Organization {
// ToTeam convert models.Team to api.Team
func ToTeam(team *models.Team) *api.Team {
+ if team == nil {
+ return nil
+ }
+
return &api.Team{
ID: team.ID,
Name: team.Name,