Skip to content

Commit

Permalink
fix account cause error
Browse files Browse the repository at this point in the history
  • Loading branch information
bxy4543 committed Jul 10, 2023
1 parent 0c00b99 commit a680523
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/account/controllers/account_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ func (r *AccountReconciler) syncAccount(ctx context.Context, name, accountNamesp
if err := r.syncRoleAndRoleBinding(ctx, name, userNamespace); err != nil {
return nil, fmt.Errorf("sync role and rolebinding failed: %v", err)
}

err := r.initBalance(&account)
if err != nil {
return nil, fmt.Errorf("sync init balance failed: %v", err)
}
// add account balance when account is new user
stringAmount := os.Getenv(NEWACCOUNTAMOUNTENV)
if stringAmount == "" {
Expand Down

0 comments on commit a680523

Please sign in to comment.