schema.py
branchstable
changeset 6109 47d9c0e0f7b7
parent 6017 5f6a60ea8544
child 6191 ece6996e6ac8
equal deleted inserted replaced
6108:c459ffa5fa6f 6109:47d9c0e0f7b7
   702     def repo_check(self, session, eidfrom, rtype, eidto=None):
   702     def repo_check(self, session, eidfrom, rtype, eidto=None):
   703         """raise ValidationError if the relation doesn't satisfy the constraint
   703         """raise ValidationError if the relation doesn't satisfy the constraint
   704         """
   704         """
   705         if not self.match_condition(session, eidfrom, eidto):
   705         if not self.match_condition(session, eidfrom, eidto):
   706             # XXX at this point if both or neither of S and O are in mainvar we
   706             # XXX at this point if both or neither of S and O are in mainvar we
   707             # dunno if the validation error `occured` on eidfrom or eidto (from
   707             # dunno if the validation error `occurred` on eidfrom or eidto (from
   708             # user interface point of view)
   708             # user interface point of view)
   709             #
   709             #
   710             # possible enhancement: check entity being created, it's probably
   710             # possible enhancement: check entity being created, it's probably
   711             # the main eid unless this is a composite relation
   711             # the main eid unless this is a composite relation
   712             if eidto is None or 'S' in self.mainvars or not 'O' in self.mainvars:
   712             if eidto is None or 'S' in self.mainvars or not 'O' in self.mainvars: