Kaynağa Gözat

Bugfix on the recursive select

Roland Haroutiounian 8 yıl önce
ebeveyn
işleme
8e4815c34f
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3
    2
      plugins/mongodb_datasource/datasource.py

+ 3
- 2
plugins/mongodb_datasource/datasource.py Dosyayı Görüntüle

@@ -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…
İptal
Kaydet