# HG changeset patch # User Sylvain Thénault # Date 1270043972 -7200 # Node ID c06078d59e87aa04215dcb9b2bed39fd65f4935d # Parent 768beb8e15f15e079f8ee6cfc35125e12b19e140 [schema] ensure we don't remove has_text relation type unfortunatly diff -r 768beb8e15f1 -r c06078d59e87 schema.py --- a/schema.py Wed Mar 31 15:04:36 2010 +0200 +++ b/schema.py Wed Mar 31 15:59:32 2010 +0200 @@ -400,7 +400,9 @@ __permissions__=RO_ATTR_PERMS) self.schema.add_relation_def(rdef) elif not need_has_text and has_has_text: - self.schema.del_relation_def(self.type, 'has_text', 'String') + # use rschema.del_relation_def and not schema.del_relation_def to + # avoid deleting the relation type accidentally... + self.schema['has_text'].del_relation_def(self, self.schema['String']) def schema_entity(self): """return True if this entity type is used to build the schema"""