schema.py
branchstable
changeset 5122 c06078d59e87
parent 5030 5238d9a8dfee
child 5174 78438ad513ca
child 5421 8167de96c523
--- 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"""