Skip to content

Commit

Permalink
Merge pull request #11 from darcys22/dev
Browse files Browse the repository at this point in the history
And same error to MySQL
  • Loading branch information
darcys22 authored May 18, 2020
2 parents 548ed15 + cd7e671 commit fceee5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion godbledger/db/mysql/mysqlfuncs.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (db *Database) SafeAddCurrency(cur *core.Currency) error {
func (db *Database) FindAccount(code string) (*core.Account, error) {
var resp core.Account
log.Info("Searching Account in DB")
err := db.DB.QueryRow(`SELECT * FROM accounts WHERE account_id = ? LIMIT 1`, code).Scan(&resp.Code, &resp.Name)
err := db.DB.QueryRow(`SELECT * FROM accounts WHERE account_id = ? LIMIT 1`, strings.TrimSpace(code)).Scan(&resp.Code, &resp.Name)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit fceee5b

Please sign in to comment.