Fix storage typos

This commit is contained in:
The Magician 2024-05-30 14:33:37 +01:00
parent cb8435b652
commit 7c9f9f4110
1 changed files with 4 additions and 2 deletions

View File

@ -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
}