Skip to content

Commit

Permalink
check Targets slice
Browse files Browse the repository at this point in the history
  • Loading branch information
lubedacht committed Jan 15, 2024
1 parent a9a3ee1 commit 849d9f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/service/cloud/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ func (s *Service) checkForPendingLANRequest(method string, lanID string) (status

for _, r := range requests {
if method != http.MethodPost {
id := *(*r.Metadata.RequestStatus.Metadata.Targets)[0].Target.Id
if id != lanID {
targets := *r.Metadata.RequestStatus.Metadata.Targets
if targets == nil {
continue
}

if *targets[0].Target.Id != lanID {
continue
}
} else {
Expand Down

0 comments on commit 849d9f9

Please sign in to comment.