merge stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 31 Mar 2010 16:00:16 +0200
branchstable
changeset 5123 d4b18bb90550
parent 5122 c06078d59e87 (diff)
parent 5120 3c58429f8b5c (current diff)
child 5124 d4d0b4b2298a
merge
--- a/schema.py	Wed Mar 31 15:37:41 2010 +0200
+++ b/schema.py	Wed Mar 31 16:00:16 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"""