original_docstring: 
      Check if there is an open transaction on this object
      :param db: The db session to update in.
      :param type: The type of commit {page, user}.
      :param name: The name of the page or user.
      :return: If there are any active transactions.
      
docstring: Check if there is an open transaction on this object
docstring_tokens: Check if there is an open transaction on this object
code: def log_has_open_tranaction(db: Session, type: str, name: str) -> bool:
      """
      Check if there is an open transaction on this object
      :param db: The db session to update in.
      :param type: The type of commit {page, user}.
      :param name: The name of the page or user.
      :return: If there are any active transactions.
      """
      return db.query(models.Log) \
          .filter(models.Log.type == type, models.Log.name == name,
                  models.Log.status != 'done', models.Log.status != 'aborted') \
          .count() != 0
code_tokens: def log_has_open_tranaction ( db : Session , type : str , name : str ) -> bool : return db . query ( models . Log ) . filter ( models . Log . type == type , models . Log . name == name , models . Log . status != 'done' , models . Log . status != 'aborted' ) . count ( ) != 0
short_docstring: Check if there is an open transaction on this object
short_docstring_tokens: Check if there is an open transaction on this object
comment: """
      Check if there is an open transaction on this object
      :param db: The db session to update in.
      :param type: The type of commit {page, user}.
      :param name: The name of the page or user.
      :return: If there are any active transactions.
      """