Procházet zdrojové kódy

Merge branch 't85'

Roland Haroutiounian před 9 roky
rodič
revize
37551572d4
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2
    3
      leapi/datasources/ledatasourcesql.py

+ 2
- 3
leapi/datasources/ledatasourcesql.py Zobrazit soubor

@@ -74,7 +74,6 @@ class LeDataSourceSQL(DummyDatasource):
74 74
     # @param filters list : List of filters (see @ref leobject_filters)
75 75
     # @param rel_filters list : List of relational filters (see @ref leobject_filters)
76 76
     # @return the number of deleted components
77
-    # TODO Retourner le nombre de lignes supprimées
78 77
     def delete(self, target_cls, filters, rel_filters):
79 78
         query_table_name = self.datasource_utils.get_table_name_from_class(target_cls.__name__)
80 79
         prep_filters = self._prepare_filters(filters, query_table_name)
@@ -107,10 +106,10 @@ class LeDataSourceSQL(DummyDatasource):
107 106
 
108 107
         query_delete_from_object = delete(self.datasource_utils.objects_table_name, {'lodel_id': filters['lodel_id']})
109 108
         with self.connection as cur:
110
-            cur.execute(query)
109
+            result = cur.execute(query)
111 110
             cur.execute(query_delete_from_object)
112 111
 
113
-        return True
112
+        return result
114 113
 
115 114
     ## @brief update an existing lodel editorial component
116 115
     # @param target_cls LeCrud(class) : The component class concerned by the update (a LeCrud child class (not instance !) )

Loading…
Zrušit
Uložit