Skip to content

Commit

Permalink
Merge pull request #134 from orange-cloudfoundry/fix-nil-route
Browse files Browse the repository at this point in the history
fix nil routes
  • Loading branch information
mdimiceli authored Jul 1, 2024
2 parents 94fdea9 + a31a428 commit 5a4145a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions models/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func (rts Routes) FindByOrgSpaceName(org, space, name string) []*Route {
exist := make(map[string]bool)
for u, routes := range rts {
for _, route := range routes {
if route == nil {
log.Debugf("Route is nil for %s", string(u))
continue
}
route.URL = string(u)
if route.Tags.ProcessType != ProcessWeb {
continue
Expand All @@ -72,6 +76,10 @@ func (rts Routes) FindById(appId string) []*Route {
exist := make(map[string]bool)
for u, routes := range rts {
for _, route := range routes {
if route == nil {
log.Debugf("Route is nil for %s", string(u))
continue
}
route.URL = string(u)
if route.Tags.ProcessType != ProcessWeb {
continue
Expand Down

0 comments on commit 5a4145a

Please sign in to comment.