propagate rtags api change tls-sprint
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 29 Apr 2009 11:53:08 +0200
branchtls-sprint
changeset 1539 b0d583d30508
parent 1538 806a7ca31411
child 1540 996355824825
propagate rtags api change
web/views/autoform.py
web/views/boxes.py
--- a/web/views/autoform.py	Wed Apr 29 11:49:19 2009 +0200
+++ b/web/views/autoform.py	Wed Apr 29 11:53:08 2009 +0200
@@ -60,7 +60,7 @@
                         X, Y = tschema, eschema
                         card = rschema.rproperty(X, Y, 'cardinality')[1]
                         composed = rschema.rproperty(X, Y, 'composite') == 'subject'
-                    if not cls.rcategories.rtag(rschema, role, X, Y):
+                    if not cls.rcategories.get(rschema, role, X, Y):
                         if card in '1+':
                             if not rschema.is_final() and composed:
                                 category = 'generated'
@@ -70,7 +70,7 @@
                             category = 'secondary'
                         else:
                             category = 'generic'
-                        cls.rcategories.add_relation(category, (X, rschema, Y), role)
+                        cls.rcategories.tag_relation(category, (X, rschema, Y), role)
 
     @classmethod
     def erelations_by_category(cls, entity, categories=None, permission=None, rtags=None):
--- a/web/views/boxes.py	Wed Apr 29 11:49:19 2009 +0200
+++ b/web/views/boxes.py	Wed Apr 29 11:53:08 2009 +0200
@@ -53,7 +53,7 @@
                     else:
                         X, Y = tschema, eschema
                         card = rschema.rproperty(X, Y, 'cardinality')[1]
-                    if not cls.rmode.rtag(rschema, role, X, Y):
+                    if not cls.rmode.get(rschema, role, X, Y):
                         if card in '?1':
                             # by default, suppose link mode if cardinality doesn't allow
                             # more than one relation