We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 548ed15 + cd7e671 commit fceee5bCopy full SHA for fceee5b
godbledger/db/mysql/mysqlfuncs.go
@@ -296,7 +296,7 @@ func (db *Database) SafeAddCurrency(cur *core.Currency) error {
296
func (db *Database) FindAccount(code string) (*core.Account, error) {
297
var resp core.Account
298
log.Info("Searching Account in DB")
299
- 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)
300
if err != nil {
301
return nil, err
302
}
0 commit comments