server/msplanner.py
branchstable
changeset 6057 cb5c8852cbda
parent 6056 37a37e5ba330
child 6128 fbb8398f80dc
--- a/server/msplanner.py	Tue Aug 03 12:17:01 2010 +0200
+++ b/server/msplanner.py	Tue Aug 03 12:17:20 2010 +0200
@@ -419,9 +419,9 @@
                         self._set_source_for_term(source, const)
                         # if system source is used, add every rewritten constant
                         # to its supported terms even when associated entity
-                        # doesn't actually come from it so we get a changes
-                        # that allequals will return True as expected when
-                        # computing needsplit
+                        # doesn't actually come from it so we get a changes that
+                        # allequals will return True as expected when computing
+                        # needsplit
                         # check const is used in a relation restriction
                         if const.relation() and self.system_source in sourcesterms:
                             self._set_source_for_term(self.system_source, const)
@@ -432,7 +432,7 @@
             # process non final relations only
             # note: don't try to get schema for 'is' relation (not available
             # during bootstrap)
-            if not rel.is_types_restriction() and not rschema(rel.r_type).final:
+            if not (rel.is_types_restriction() or rschema(rel.r_type).final):
                 # nothing to do if relation is not supported by multiple sources
                 # or if some source has it listed in its cross_relations
                 # attribute
@@ -1429,8 +1429,8 @@
         if not node.is_types_restriction():
             if node in self.skip and self.solindices.issubset(self.skip[node]):
                 if not self.schema.rschema(node.r_type).final:
-                    # can't really skip the relation if one variable is selected and only
-                    # referenced by this relation
+                    # can't really skip the relation if one variable is selected
+                    # and only referenced by this relation
                     for vref in node.iget_nodes(VariableRef):
                         stinfo = vref.variable.stinfo
                         if stinfo['selected'] and len(stinfo['relations']) == 1: