Skip to content

Commit

Permalink
fix panics caused by nil values
Browse files Browse the repository at this point in the history
  • Loading branch information
makkalot committed Aug 25, 2021
1 parent 0073c1f commit 85b1e1d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cla-backend-go/v2/gitlab_organizations/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ func (s *Service) GetGitLabOrganizationByFullPath(ctx context.Context, gitLabOrg
return nil, err
}

if dbModel == nil {
return nil, nil
}
return common.ToModel(dbModel), nil
}

Expand All @@ -218,6 +221,10 @@ func (s *Service) GetGitLabOrganizationByGroupID(ctx context.Context, gitLabGrou
return nil, err
}

if dbModel == nil {
return nil, nil
}

return common.ToModel(dbModel), nil
}

Expand Down

0 comments on commit 85b1e1d

Please sign in to comment.