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