equal
deleted
inserted
replaced
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: |