entity.py
branchstable
changeset 4988 d85f639e9150
parent 4970 1f3d8946ea84
child 4989 0e6dca27422c
equal deleted inserted replaced
4987:ec93dd82c83f 4988:d85f639e9150
   899         # in the dictionary
   899         # in the dictionary
   900         if self._cw is None:
   900         if self._cw is None:
   901             _ = unicode
   901             _ = unicode
   902         else:
   902         else:
   903             _ = self._cw._
   903             _ = self._cw._
   904         if creation or not hasattr(self, 'edited_attributes'):
   904         if creation:
   905             # on creations, we want to check all relations, especially
   905             # on creations, we want to check all relations, especially
   906             # required attributes
   906             # required attributes
   907             relations = None
   907             relations = [rschema for rschema in self.e_schema.subject_relations()
   908         else:
   908                          if rschema.final and rschema.type != 'eid']
       
   909         elif hasattr(self, 'edited_attributes'):
   909             relations = [self._cw.vreg.schema.rschema(rtype)
   910             relations = [self._cw.vreg.schema.rschema(rtype)
   910                          for rtype in self.edited_attributes]
   911                          for rtype in self.edited_attributes]
       
   912         else:
       
   913             relations = None
   911         self.e_schema.check(self, creation=creation, _=_,
   914         self.e_schema.check(self, creation=creation, _=_,
   912                             relations=relations)
   915                             relations=relations)
   913 
   916 
   914     def fti_containers(self, _done=None):
   917     def fti_containers(self, _done=None):
   915         if _done is None:
   918         if _done is None: