Browse Source

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

Roland Haroutiounian 10 years ago
parent
commit
39c9e741cc
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      EditorialModel/fields_types.py

+ 2
- 2
EditorialModel/fields_types.py View File

70
     def _deleteDb(self):
70
     def _deleteDb(self):
71
         dbe = EmComponent.getDbe()
71
         dbe = EmComponent.getDbe()
72
         table = sqla.Table(self.table, sqlutils.meta(dbe))
72
         table = sqla.Table(self.table, sqlutils.meta(dbe))
73
-        req = table.Delete().Where(table.c.type_id==self.type_id).Where(table.c.field_id==self.field_id)
73
+        req = table.delete().where(table.c.type_id==self.type_id).where(table.c.field_id==self.field_id)
74
         conn = dbe.connect()
74
         conn = dbe.connect()
75
         try:
75
         try:
76
             conn.execute(req)
76
             conn.execute(req)
97
     def _existsDb(self):
97
     def _existsDb(self):
98
         dbe = EmComponent.getDbe()
98
         dbe = EmComponent.getDbe()
99
         table = sqla.Table(self.table, sqlutils.meta(dbe))
99
         table = sqla.Table(self.table, sqlutils.meta(dbe))
100
-        req = table.Select().Where(table.c.type_id==self.type_id).Where(table.c.field_id==self.field_id)
100
+        req = table.select().where(table.c.type_id==self.type_id).where(table.c.field_id==self.field_id)
101
         conn = dbe.connect()
101
         conn = dbe.connect()
102
         res = conn.execute(req).fetchall()
102
         res = conn.execute(req).fetchall()
103
         conn.close()
103
         conn.close()

Loading…
Cancel
Save