Skip to content

Commit

Permalink
Fix realizedstate check on empty list (#1003)
Browse files Browse the repository at this point in the history
Signed-off-by: Yanjun Zhou <[email protected]>
  • Loading branch information
yanjunz97 committed Jan 15, 2025
1 parent c2d1cf9 commit a2b8596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nsx/services/realizestate/realize_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (service *RealizeStateService) CheckRealizeState(backoff wait.Backoff, inte
return NewRealizeStateError(fmt.Sprintf("%s realized with errors: %s", intentPath, errMsg))
}
}
if entitiesRealized == len(results.Results) {
if len(results.Results) != 0 && entitiesRealized == len(results.Results) {
return nil
}
return fmt.Errorf("%s not realized", intentPath)
Expand Down

0 comments on commit a2b8596

Please sign in to comment.