Beispiel #1
0
def get(id):
    asset = Asset.get_or_none(Asset.id == id)
    if asset:
        return asset.to_dict()
Beispiel #2
0
def get_by_url(url):
    return Asset.get_or_none(Asset.url == url)
Beispiel #3
0
def exists(id):
    return bool(Asset.get_or_none(Asset.id == id))