Exemplo n.º 1
0
def fetch_alias(id, **props):
    "Query for and fetch Alias. "
    q = query_alias(id, **props)
    singleFetch = id or ('handle' in props and not props.get('handle').endswith('%'))
    if singleFetch and interface.IQuery.providedBy(q):
        return model.single_result(q)
    return q
Exemplo n.º 2
0
def fetch_config(schema, name, **props):
    q = query_config(schema, name, **props)
    if name and interface.IQuery.providedBy(q):
        return model.single_result(q)
    return q