Browse Source

[#61] Corrected the headers of update and delete methods in dummy datasource

Roland Haroutiounian 9 years ago
parent
commit
e064173359
2 changed files with 5 additions and 6 deletions
  1. 4
    6
      leobject/datasources/dummy.py
  2. 1
    0
      leobject/datasources/ledatasourcesql.py

+ 4
- 6
leobject/datasources/dummy.py View File

@@ -15,9 +15,8 @@ class DummyDatasource(object):
15 15
     ## @brief update an existing LeObject
16 16
     # @param lodel_id (int) : list of lodel_id
17 17
     # @param checked_data dict
18
-    # @param datasource_filters (string)
19
-    def update(self, lodel_id, checked_data, datasource_filters):
20
-        print ("DummyDatasource.update: ", lodel_id, checked_data, datasource_filters)
18
+    def update(self, lodel_id, checked_data):
19
+        print ("DummyDatasource.update: ", lodel_id, checked_data)
21 20
         return True
22 21
 
23 22
     ## @brief create a new LeObject
@@ -31,10 +30,9 @@ class DummyDatasource(object):
31 30
 
32 31
     ## @brief delete an existing LeObject
33 32
     # @param lodel_id int | (int): lodel_id of the object(s) to delete
34
-    # @param delete_filters string | (string): list of string of delete filters
35 33
     # @return okay bool: True on success, it will raise on failure
36
-    def delete(self, lodel_id, delete_filters=None):
37
-        print("DummyDatasource.delete: ", lodel_id, delete_filters)
34
+    def delete(self, lodel_id):
35
+        print("DummyDatasource.delete: ", lodel_id)
38 36
         return True
39 37
 
40 38
     ## @brief search for a collection of objects

+ 1
- 0
leobject/datasources/ledatasourcesql.py View File

@@ -21,6 +21,7 @@ class LeDataSourceSQL(DummyDatasource):
21 21
     def get(self, emclass, emtype, field_list, filters, relational_filters):
22 22
         tablename =  emclass.name
23 23
         where_filters = self._prepare_filters(filters)
24
+        rel_filters = self._prepare_filters(relational_filters)
24 25
         query = select(tablename, where=where_filters, select=field_list)
25 26
         self.db.execute(query)
26 27
         return all_to_dicts(self.db)

Loading…
Cancel
Save