equal
deleted
inserted
replaced
569 :param: the newly created or just completed relation schema |
569 :param: the newly created or just completed relation schema |
570 """ |
570 """ |
571 rdef.name = rdef.name.lower() |
571 rdef.name = rdef.name.lower() |
572 rdef.subject = bw_normalize_etype(rdef.subject) |
572 rdef.subject = bw_normalize_etype(rdef.subject) |
573 rdef.object = bw_normalize_etype(rdef.object) |
573 rdef.object = bw_normalize_etype(rdef.object) |
574 try: |
574 rdefs = super(CubicWebSchema, self).add_relation_def(rdef) |
575 rdefs = super(CubicWebSchema, self).add_relation_def(rdef) |
|
576 except BadSchemaDefinition: |
|
577 reversed_etype_map = dict( (v, k) for k, v in ETYPE_NAME_MAP.iteritems() ) |
|
578 if rdef.subject in reversed_etype_map or rdef.object in reversed_etype_map: |
|
579 return |
|
580 raise |
|
581 if rdefs: |
575 if rdefs: |
582 try: |
576 try: |
583 self._eid_index[rdef.eid] = rdefs |
577 self._eid_index[rdef.eid] = rdefs |
584 except AttributeError: |
578 except AttributeError: |
585 pass # not a serialized schema |
579 pass # not a serialized schema |