# HG changeset patch # User Adrien Di Mascio # Date 1246284261 -7200 # Node ID 1f0fde12e35bb25c6634d3858b32c64d76bde4ce # Parent 488099333160d8997e4139d8f545be316896e6d1 [rtags] override tag_xxx_of() methods in DisplayCtrlRelationTags to make sure a wildcard is used diff -r 488099333160 -r 1f0fde12e35b web/uicfg.py --- a/web/uicfg.py Sat Jun 27 00:59:36 2009 +0200 +++ b/web/uicfg.py Mon Jun 29 16:04:21 2009 +0200 @@ -129,6 +129,21 @@ self._counter += 1 tag.setdefault('order', self._counter) + def tag_subject_of(self, key, tag): + subj, rtype, obj = key + if obj != '*': + self.warning('using explict target type in display_ctrl.tag_subject_of() ' + 'has no effect, use (%s, %s, "*") instead of (%s, %s, %s)', + subj, rtype, subj, rtype, obj) + super(DisplayCtrlRelationTags, self).tag_subject_of((subj, rtype, '*'), tag) + + def tag_object_of(self, key, tag): + subj, rtype, obj = key + if subj != '*': + self.warning('using explict subject type in display_ctrl.tag_object_of() ' + 'has no effect, use ("*", %s, %s) instead of (%s, %s, %s)', + rtype, obj, subj, rtype, obj) + super(DisplayCtrlRelationTags, self).tag_object_of(('*', rtype, obj), tag) def init_primaryview_display_ctrl(rtag, sschema, rschema, oschema, role): if role == 'subject':