# HG changeset patch # User Sylvain Thénault # Date 1260291910 -3600 # Node ID 0c39ffd789edb4d280a09b40a1c05d16aa73b559 # Parent eec34250a6456bbcd61abfc4fd7fd1b2f3c83f45 yams api update diff -r eec34250a645 -r 0c39ffd789ed hooks/syncschema.py --- a/hooks/syncschema.py Tue Dec 08 18:04:57 2009 +0100 +++ b/hooks/syncschema.py Tue Dec 08 18:05:10 2009 +0100 @@ -1070,13 +1070,13 @@ return schema = self._cw.vreg.schema entity = self._cw.entity_from_eid(self.eidto) - subjtype, rtype, objtype = schema.schema_by_eid(self.eidfrom) + rdef = schema.schema_by_eid(self.eidfrom) try: - cstr = rtype.rdef(subjtype, objtype).constraint_by_type( - entity.cstrtype[0].name) + cstr = rdef.constraint_by_type(entity.type) except IndexError: self._cw.critical('constraint type no more accessible') else: + subjtype, rtype, objtype = rdef.as_triple() SourceDbCWConstraintDel(self._cw, subjtype=subjtype, rtype=rtype, objtype=objtype, cstr=cstr) MemSchemaCWConstraintDel(self._cw, subjtype=subjtype, rtype=rtype,