web/facet.py
changeset 4072 ead446e70c28
parent 3720 5376aaadd16b
child 4074 9cce43f52c61
equal deleted inserted replaced
4071:e19e586cc74e 4072:ead446e70c28
   107         # not directly linked to the main variable
   107         # not directly linked to the main variable
   108         return None
   108         return None
   109     if rel.optional in (opt, 'both'):
   109     if rel.optional in (opt, 'both'):
   110         # optional relation
   110         # optional relation
   111         return ovar
   111         return ovar
   112     if all(rschema.rproperty(s, o, 'cardinality')[cardidx] in '1+'
   112     if all(rdefs.cardinality[cardidx] in '1+'
   113            for s,o in rschema.iter_rdefs()):
   113            for rdefs in rschema.rdefs.itervalues()):
   114         # mandatory relation without any restriction on the other variable
   114         # mandatory relation without any restriction on the other variable
   115         for orel in ovar.stinfo['relations']:
   115         for orel in ovar.stinfo['relations']:
   116             if rel is orel:
   116             if rel is orel:
   117                 continue
   117                 continue
   118             if _may_be_removed(orel, schema, ovar) is None:
   118             if _may_be_removed(orel, schema, ovar) is None: