equal
deleted
inserted
replaced
70 """ |
70 """ |
71 :param vreg: the :py:class:`CWRegistryStore` managing this registry. |
71 :param vreg: the :py:class:`CWRegistryStore` managing this registry. |
72 """ |
72 """ |
73 super(CWRegistry, self).__init__(True) |
73 super(CWRegistry, self).__init__(True) |
74 self.vreg = vreg |
74 self.vreg = vreg |
75 |
75 self.add_select_best_listener(self._emit_registry_debug_information) |
76 def _select_best(self, objects, *args, **kwargs): |
76 |
77 """ |
77 def _emit_registry_debug_information(self, debug_registry_select_best): |
78 Overwrite version of Registry._select_best to emit debug information. |
78 emit_to_debug_channel("registry_decisions", debug_registry_select_best) |
79 """ |
|
80 def emit_registry_debug_information(debug_registry_select_best): |
|
81 emit_to_debug_channel("registry_decisions", debug_registry_select_best) |
|
82 |
|
83 kwargs["debug_callback"] = emit_registry_debug_information |
|
84 return super()._select_best(objects, *args, **kwargs) |
|
85 |
79 |
86 @property |
80 @property |
87 def schema(self): |
81 def schema(self): |
88 """The :py:class:`cubicweb.schema.CubicWebSchema` |
82 """The :py:class:`cubicweb.schema.CubicWebSchema` |
89 """ |
83 """ |