hooks/integrity.py
changeset 4003 b9436fe77c9e
parent 3998 94cc7cad3d2d
child 4023 eae23c40627a
equal deleted inserted replaced
3998:94cc7cad3d2d 4003:b9436fe77c9e
   165     def __call__(self):
   165     def __call__(self):
   166         schema = self._cw.vreg.schema
   166         schema = self._cw.vreg.schema
   167         entity = self.entity
   167         entity = self.entity
   168         for attr in entity.edited_attributes:
   168         for attr in entity.edited_attributes:
   169             if schema.rschema(attr).final:
   169             if schema.rschema(attr).final:
   170                 constraints = [c for c in entity.rdef(attr).constraints
   170                 constraints = [c for c in entity.e_schema.rdef(attr).constraints
   171                                if isinstance(c, (RQLUniqueConstraint, RQLConstraint))]
   171                                if isinstance(c, (RQLUniqueConstraint, RQLConstraint))]
   172                 if constraints:
   172                 if constraints:
   173                     _CheckConstraintsOp(self._cw, constraints=constraints,
   173                     _CheckConstraintsOp(self._cw, constraints=constraints,
   174                                         rdef=(entity.eid, attr, None))
   174                                         rdef=(entity.eid, attr, None))
   175 
   175