U
    œäVcF  ã                   @   sZ   d dl Z d dlZd dlZd dlT d dlmZ d dlmZ d dlm	Z	 G dd„ dej
ƒZ
dS )é    N)Ú*)Úcmf_comment)ÚPath)ÚCmfActiveEntityc                       s"   e Zd Zddœ‡ fdd„
Z‡  ZS )Ú
CmfCommentF)Úforcec                   sb   |   dg¡ | j}|s&| j ¡ j ¡ }|rLtd|j› d| jji| ¡ d tƒ j	|d|i|—ŽS )NÚparentzcomment-delete-Úid)Zevent_personsr   )
Zload_fieldsr   Ztree_parentÚloadZcmf_emit_eventr	   ÚvalueZall_relation_personsÚsuperÚdelete)Úselfr   ÚargsÚkwargsr   ©Ú	__class__© ú./common/models/cmf_comment.pyr      s    "zCmfComment.delete)Ú__name__Ú
__module__Ú__qualname__r   Ú__classcell__r   r   r   r   r      s   r   )Úbase64ZdatetimeZ	mimetypesZcmf.includeZ
cmf.modelsr   Úpathlibr   Zcommon.models.cmf_active_entityr   r   r   r   r   r   Ú<module>   s   