def get_object_or_404(query_or_model, *query):
    if not isinstance(query_or_model, SelectQuery):
        query_or_model = query_or_model.select()
    try:
        return query_or_model.where(*query).get()
    except __HOLE__:
        abort(404)
dataset/ETHPy150Open coleifer/flask-peewee/flask_peewee/utils.py/get_object_or_404