Skip to content

Commit fceee5b

Browse files
authored
Merge pull request #11 from darcys22/dev
And same error to MySQL
2 parents 548ed15 + cd7e671 commit fceee5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

godbledger/db/mysql/mysqlfuncs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func (db *Database) SafeAddCurrency(cur *core.Currency) error {
296296
func (db *Database) FindAccount(code string) (*core.Account, error) {
297297
var resp core.Account
298298
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)
299+
err := db.DB.QueryRow(`SELECT * FROM accounts WHERE account_id = ? LIMIT 1`, strings.TrimSpace(code)).Scan(&resp.Code, &resp.Name)
300300
if err != nil {
301301
return nil, err
302302
}

0 commit comments

Comments
 (0)