Commit db18ac63 authored by Marine Marsal's avatar Marine Marsal
Browse files

Update PretDataMapper.py

parent 034790f4
......@@ -37,7 +37,7 @@ class PretDataMapper(DataMapper):
finally:
connection.close()
def retourPret(self, pretID, etat) :
def retourPret(self, pretID) :
connection = self.connect()
try:
cursor : psycopg2.extensions.cursor = connection.cursor()
......@@ -45,7 +45,7 @@ class PretDataMapper(DataMapper):
rows = cursor.fetchall()
for row in rows :
ref = row[0]
cursor.execute("UPDATE Exemplaire SET disponible = true, etat = '{0}' WHERE ref = '{1}'".format(etat, ref))
cursor.execute("UPDATE Exemplaire SET disponible = true WHERE ref = '{0}'".format(ref))
connection.commit()
except Exception as err:
print(err)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment