Browse Source

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

Roland Haroutiounian 9 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,7 +70,7 @@ class Em_Field_Type(object):
70 70
     def _deleteDb(self):
71 71
         dbe = EmComponent.getDbe()
72 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 74
         conn = dbe.connect()
75 75
         try:
76 76
             conn.execute(req)
@@ -97,7 +97,7 @@ class Em_Field_Type(object):
97 97
     def _existsDb(self):
98 98
         dbe = EmComponent.getDbe()
99 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 101
         conn = dbe.connect()
102 102
         res = conn.execute(req).fetchall()
103 103
         conn.close()

Loading…
Cancel
Save