Skip to content

Commit

Permalink
Update pkg/control/control.go
Browse files Browse the repository at this point in the history
Co-authored-by: Kidswiss <[email protected]>
  • Loading branch information
TheBigLee and Kidswiss authored Dec 18, 2023
1 parent cbe5ada commit d3cd8e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ func GetSalesOrder(ctx context.Context, k8sClient client.Client, orgId string) (
if err != nil {
return "", fmt.Errorf("cannot get Organization object '%s', err: %v", orgId, err)
}
if org.Status.SaleOrderName != "" {
if org.Status.SaleOrderName == "" {
return "", fmt.Errorf("Cannot get SalesOrder from organization object '%s', err: %v", orgId, err)
}
return org.Status.SaleOrderName, nil
return org.Status.SaleOrderName, nil
} else {

Check failure on line 23 in pkg/control/control.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected else after top level declaration

Check failure on line 23 in pkg/control/control.go

View workflow job for this annotation

GitHub Actions / lint

expected ';', found 'else'

Check failure on line 23 in pkg/control/control.go

View workflow job for this annotation

GitHub Actions / go

expected ';', found 'else'
return "", fmt.Errorf("Cannot get SalesOrder from organization object '%s', err: %v", orgId, err)

Check failure on line 24 in pkg/control/control.go

View workflow job for this annotation

GitHub Actions / lint

expected declaration, found 'return'

Check failure on line 24 in pkg/control/control.go

View workflow job for this annotation

GitHub Actions / go

expected declaration, found 'return'
Expand Down

0 comments on commit d3cd8e9

Please sign in to comment.