djdb/search.py
def _album_is_reviewed(album, user_key):
    """Check if an album has been reviewed.

    Args:
      album: An Album entity
      user_key: A stringified user key, or None.

    Returns:
      If user_key is None, returns True if and only if the album has
        any reviews at all.
      If user_key is not None, returns True if and only if the album
        has been reviewed by the specified user.
    """
    if user_key is None or user_key == "":
        return len(album.reviews) > 0
    for review in album.reviews:
        if str(review.author.key()) == user_key:
            return True
    return False
Check if an album has been reviewed.

    Args:
      album: An Album entity
      user_key: A stringified user key, or None.

    Returns:
      If user_key is None, returns True if and only if the album has
        any reviews at all.
      If user_key is not None, returns True if and only if the album
        has been reviewed by the specified user.
    
Check if an album has been reviewed.
Check if an album has been reviewed .
def _album_is_reviewed(album, user_key):
    if user_key is None or user_key == "":
        return len(album.reviews) > 0
    for review in album.reviews:
        if str(review.author.key()) == user_key:
            return True
    return False
def _album_is_reviewed ( album , user_key ) : if user_key is None or user_key == "" : return len ( album . reviews ) > 0 for review in album . reviews : if str ( review . author . key ( ) ) == user_key : return True return False
Check if an album has been reviewed.
Check if an album has been reviewed .
"""Check if an album has been reviewed.

    Args:
      album: An Album entity
      user_key: A stringified user key, or None.

    Returns:
      If user_key is None, returns True if and only if the album has
        any reviews at all.
      If user_key is not None, returns True if and only if the album
        has been reviewed by the specified user.
    """
If user_key is None, returns True if and only if the album has
any reviews at all.
If user_key is not None, returns True if and only if the album
has been reviewed by the specified user.
If user_key is None returns True if and only if the album has any reviews at all . If user_key is not None returns True if and only if the album has been reviewed by the specified user .
album
An Album entity
An Album entity
user_key
A stringified user key, or None.
A stringified user key or None .