Skip to content

Commit

Permalink
Need to store email address and serial number in consistent casing fo…
Browse files Browse the repository at this point in the history
…r updates on return.
  • Loading branch information
adamsher committed May 23, 2023
1 parent 81dfee7 commit b75da80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devicekiosk.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def addLoanerToDB(self, device):

# Write a query and execute it with cursor
query = "INSERT INTO DAILY (Email, First_Name, Last_Name, Date_Borrowed, Serial, Device) VALUES (?, ?, ?, DATE('now'), ?, ?)"
args = (self.emailAddress, self.firstName, self.lastName, self.loanerSerialNumber, device)
args = (self.emailAddress.lower(), self.firstName, self.lastName, self.loanerSerialNumber.lower(), device)
cursor.execute(query, args)
sqliteConnection.commit()

Expand Down Expand Up @@ -346,7 +346,7 @@ def returnLoanerInDB(self):

# Write a query and execute it with cursor
query = "UPDATE DAILY SET Date_Returned = DATE('now') WHERE (Email = ? AND Serial = ?)"
args = (self.emailAddress, self.loanerSerialNumber)
args = (self.emailAddress.lower(), self.loanerSerialNumber.lower())
cursor.execute(query, args)
sqliteConnection.commit()

Expand Down

0 comments on commit b75da80

Please sign in to comment.