Преглед на файлове

Bugfixes in webui admin controler and in mongo datasource

Yann Weber преди 7 години
родител
ревизия
471d99d3d9
променени са 2 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 5
    1
      lodel/plugins/mongodb_datasource/datasource.py
  2. 1
    1
      lodel/plugins/webui/interface/controllers/admin.py

+ 5
- 1
lodel/plugins/mongodb_datasource/datasource.py Целия файл

@@ -566,13 +566,17 @@ is not a reference : '%s' field '%s'" % (bref_leo, bref_fname))
566 566
     def __act_on_abstract(self,
567 567
         target, filters, relational_filters, act, **kwargs):
568 568
 
569
+        logger.debug("Abstract %s, running reccursiv select \
570
+on non abstract childs" % act.__name__)
569 571
         result = list() if act == self.select else 0
570 572
         if not target.is_abstract():
571
-            target_childs = target
573
+            target_childs = [target]
572 574
         else:
573 575
             target_childs = [tc for tc in target.child_classes()
574 576
                 if not tc.is_abstract()]
575 577
         for target_child in target_childs:
578
+            logger.debug(
579
+                "Abstract %s on %s" % (act.__name__, target_child.__name__))
576 580
             #Add target_child to filter
577 581
             new_filters = copy.copy(filters)
578 582
             for i in range(len(filters)):

+ 1
- 1
lodel/plugins/webui/interface/controllers/admin.py Целия файл

@@ -9,9 +9,9 @@ LodelContext.expose_modules(globals(), {
9 9
     'lodel.leapi.datahandlers.base_classes': ['MultipleRef'],
10 10
     'lodel.leapi.exceptions': ['LeApiDataCheckErrors'],
11 11
     'lodel.exceptions': ['LodelExceptions']})
12
+LodelContext.expose_dyncode(globals(), 'dyncode')
12 13
 
13 14
 from ...client import WebUiClient
14
-import leapi_dyncode as dyncode
15 15
 import warnings
16 16
 
17 17
 LIST_SEPARATOR = ','

Loading…
Отказ
Запис