(self, username=None, **kwargs)
return
Custom delete function. Overridden to allow us to extend to other parts
        of CRITs and clean up dangling relationships, comments, objects, GridFS
        files, bucket_list counts, and favorites.
Custom delete function. Overridden to allow us to extend to other parts
        of CRITs and clean up dangling relationships, comments, objects, GridFS
        files, bucket_list counts, and favorites.
Custom delete function . Overridden to allow us to extend to other parts of CRITs and clean up dangling relationships comments objects GridFS files bucket_list counts and favorites .
def _custom_delete(self, username=None, **kwargs):
        """
        Custom delete function. Overridden to allow us to extend to other parts
        of CRITs and clean up dangling relationships, comments, objects, GridFS
        files, bucket_list counts, and favorites.
        """

        from crits.core.handlers import audit_entry, alter_bucket_list
        audit_entry(self, username, "delete")
        if self._has_method("delete_all_relationships"):
            self.delete_all_relationships(username=username)
        if self._has_method("delete_all_comments"):
            self.delete_all_comments()
        if self._has_method("delete_all_analysis_results"):
            self.delete_all_analysis_results()
        if self._has_method("delete_all_objects"):
            self.delete_all_objects()
        if self._has_method("delete_all_favorites"):
            self.delete_all_favorites()
        if hasattr(self, 'filedata'):
            self.filedata.delete()
        if hasattr(self, 'bucket_list'):
            alter_bucket_list(self, self.bucket_list, -1)
        super(self.__class__, self).delete()
        return
def _custom_delete ( self , username = None , * * kwargs ) : from crits . core . handlers import audit_entry , alter_bucket_list audit_entry ( self , username , "delete" ) if self . _has_method ( "delete_all_relationships" ) : self . delete_all_relationships ( username = username ) if self . _has_method ( "delete_all_comments" ) : self . delete_all_comments ( ) if self . _has_method ( "delete_all_analysis_results" ) : self . delete_all_analysis_results ( ) if self . _has_method ( "delete_all_objects" ) : self . delete_all_objects ( ) if self . _has_method ( "delete_all_favorites" ) : self . delete_all_favorites ( ) if hasattr ( self , 'filedata' ) : self . filedata . delete ( ) if hasattr ( self , 'bucket_list' ) : alter_bucket_list ( self , self . bucket_list , - 1 ) super ( self . __class__ , self ) . delete ( ) return