1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-07-28 00:43:28 +02:00

[#12] Correction sur la casse des fonctions de génération d'une requête Select dans fields_types.py

This commit is contained in:
Roland Haroutiounian 2015-06-19 15:55:16 +02:00
commit 39c9e741cc

View file

@ -70,7 +70,7 @@ class Em_Field_Type(object):
def _deleteDb(self):
dbe = EmComponent.getDbe()
table = sqla.Table(self.table, sqlutils.meta(dbe))
req = table.Delete().Where(table.c.type_id==self.type_id).Where(table.c.field_id==self.field_id)
req = table.delete().where(table.c.type_id==self.type_id).where(table.c.field_id==self.field_id)
conn = dbe.connect()
try:
conn.execute(req)
@ -97,7 +97,7 @@ class Em_Field_Type(object):
def _existsDb(self):
dbe = EmComponent.getDbe()
table = sqla.Table(self.table, sqlutils.meta(dbe))
req = table.Select().Where(table.c.type_id==self.type_id).Where(table.c.field_id==self.field_id)
req = table.select().where(table.c.type_id==self.type_id).where(table.c.field_id==self.field_id)
conn = dbe.connect()
res = conn.execute(req).fetchall()
conn.close()