hooks/syncschema.py
changeset 4181 c79135c217df
parent 4129 887e3edc30c5
parent 4075 e710f4052bd6
child 4252 6c4f109c2b03
equal deleted inserted replaced
4173:cfd5d3270f99 4181:c79135c217df
   937                 errors[attr] = session._("can't change the %s attribute") % \
   937                 errors[attr] = session._("can't change the %s attribute") % \
   938                                display_name(session, attr)
   938                                display_name(session, attr)
   939     if errors:
   939     if errors:
   940         raise ValidationError(entity.eid, errors)
   940         raise ValidationError(entity.eid, errors)
   941 
   941 
   942 # relation_type hooks ##########################################################
       
   943 
   942 
   944 class AfterDelRelationTypeHook(SyncSchemaHook):
   943 class AfterDelRelationTypeHook(SyncSchemaHook):
   945     """before deleting a CWAttribute or CWRelation entity:
   944     """before deleting a CWAttribute or CWRelation entity:
   946     * if this is a final or inlined relation definition, instantiate an
   945     * if this is a final or inlined relation definition, instantiate an
   947       operation to drop necessary column, else if this is the last instance
   946       operation to drop necessary column, else if this is the last instance