Browse Source

Bugfix on the recursive select

Roland Haroutiounian 7 years ago
parent
commit
8e4815c34f
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      plugins/mongodb_datasource/datasource.py

+ 3
- 2
plugins/mongodb_datasource/datasource.py View File

@@ -90,12 +90,13 @@ class MongoDbDatasource(object):
90 90
     #@param instanciate bool : If true, the records are returned as instances, else they are returned as dict
91 91
     #@return list
92 92
     #@todo Implement the relations
93
-    def select(self, target, field_list, filters = None, rel_filters=None, order=None, group=None, limit=None, offset=0):
93
+    def select(self, target, field_list, filters = None, rel_filters=None, order=None, group=None, limit=None,
94
+               offset=0):
94 95
         results = list()
95 96
         if target.abstract:
96 97
             target_childs = target.child_classes()
97 98
             for target_child in target_childs:
98
-                results.append(self.select(target=target, field_list=field_list, filters=filters,
99
+                results.append(self.select(target=target_child, field_list=field_list, filters=filters,
99 100
                                            rel_filters=rel_filters, order=order, group=group, limit=limit,
100 101
                                            offset=offset))
101 102
         else:

Loading…
Cancel
Save