parameters: (self, username=None, **kwargs)
return_statement: return
docstring: 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.
docstring_summary: 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.
docstring_tokens: 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 .
function: 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
function_tokens: 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