Skip to content

Commit

Permalink
Merge pull request #5 from kavyamani596/same_username_changes
Browse files Browse the repository at this point in the history
Modify changes for odim-operator
  • Loading branch information
jeevan-kamkar authored Sep 9, 2022
2 parents f44a300 + 332eb3c commit c24d03b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions svc-managers/managers/managers.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,12 @@ func (e *ExternalInterface) UpdateRemoteAccountService(req *managersproto.Manage
if err != nil {
panic(err)
}
username := dataMap["UserName"]
bmcCreds := mgrcommon.BmcUpdatedCreds{UserName: username.(string), UpdatedPassword: bmcAccReq.Password}

var username string
if dataMap["UserName"] != nil {
username = dataMap["UserName"].(string)
}
bmcCreds := mgrcommon.BmcUpdatedCreds{UserName: username, UpdatedPassword: bmcAccReq.Password}
requestBody, err := json.Marshal(bmcAccReq)
if err != nil {
log.Error("while marshalling the update BMC account request: " + err.Error())
Expand Down

0 comments on commit c24d03b

Please sign in to comment.