예제 #1
0
def exact_match(artwork, artist,artwork_id):
    search = Artwork.get_or_none(
        (Artwork.id == artwork_id) & (Artwork.artwork_name == artwork.artwork_name) & (Artist.artist_name == artist.artist_name))
    return search is not None
예제 #2
0
def get_art_by_id(art_id):
    """ Searches list for Artwork with given ID,
    :param id the ID to search for
    :returns the artwork, if found, or None if artwork not found.
    """
    return Artwork.get_or_none(Artwork.id == art_id)
예제 #3
0
def get_artwork_by_id(artwork_id):
    return Artwork.get_or_none(Artwork.id == artwork_id)