original_docstring:  Disable an account with the given account name.
  
      :param account: the account name.
      :param session: the database session in use.
      
docstring: Disable an account with the given account name.
docstring_tokens: Disable an account with the given account name .
code: def del_account(account, session=None):
      """ Disable an account with the given account name.
  
      :param account: the account name.
      :param session: the database session in use.
      """
      query = session.query(models.Account).filter_by(account=account).filter_by(status=AccountStatus.ACTIVE)
      try:
          account = query.one()
      except exc.NoResultFound:
          raise exception.AccountNotFound('Account with ID \'%s\' cannot be found' % account)
  
      account.update({'status': AccountStatus.DELETED, 'deleted_at': datetime.utcnow()})
code_tokens: def del_account ( account , session = None ) : query = session . query ( models . Account ) . filter_by ( account = account ) . filter_by ( status = AccountStatus . ACTIVE ) try : account = query . one ( ) except exc . NoResultFound : raise exception . AccountNotFound ( 'Account with ID \'%s\' cannot be found' % account ) account . update ( { 'status' : AccountStatus . DELETED , 'deleted_at' : datetime . utcnow ( ) } )
short_docstring: Disable an account with the given account name.
short_docstring_tokens: Disable an account with the given account name .
comment: """ Disable an account with the given account name.
  
      :param account: the account name.
      :param session: the database session in use.
      """