fix metadata detection tls-sprint
authorsylvain.thenault@logilab.fr
Thu, 30 Apr 2009 14:58:49 +0200
branchtls-sprint
changeset 1607 9747a0aa753c
parent 1606 aa766861faef
child 1616 b081fe3d5945
fix metadata detection
web/views/autoform.py
--- a/web/views/autoform.py	Thu Apr 30 14:42:03 2009 +0200
+++ b/web/views/autoform.py	Thu Apr 30 14:58:49 2009 +0200
@@ -61,11 +61,11 @@
                         card = rschema.rproperty(X, Y, 'cardinality')[1]
                         composed = rschema.rproperty(X, Y, 'composite') == 'subject'
                     if not cls.rcategories.get(rschema, role, X, Y):
-                        if card in '1+':
+                        if eschema.is_metadata(rschema):
+                            category = 'generated'
+                        elif card in '1+':
                             if not rschema.is_final() and composed:
                                 category = 'generated'
-                            elif eschema.is_metadata(rschema):
-                                category = 'generated'
                             else:
                                 category = 'primary'
                         elif rschema.is_final():