Fix storage typos
This commit is contained in:
parent
cb8435b652
commit
7c9f9f4110
|
@ -14,7 +14,7 @@ func GetLastPositionInBox(db *sql.DB, storageBox string) (int, error) {
|
|||
query := "SELECT Position FROM CardStorageLocation WHERE StorageBox = ? ORDER BY Position DESC LIMIT 1"
|
||||
|
||||
var lastPosition int
|
||||
err := db.QueryRow(query, storagebox).Scan(&lastPosition)
|
||||
err := db.QueryRow(query, storageBox).Scan(&lastPosition)
|
||||
|
||||
if err == sql.ErrNoRows {
|
||||
return 0, nil
|
||||
|
@ -35,8 +35,10 @@ func InsertCardStorageLocation(db *sql.DB, location CardStorageLocation) error {
|
|||
return err
|
||||
}
|
||||
|
||||
_, err := insert.Exec(location.CardPrintingId, location.StorageBox, location.Position, location.Source)
|
||||
_, err = insert.Exec(location.CardPrintingId, location.StorageBox, location.Position, location.Source)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue