示例#1
0
文件: api.py 项目: dotmpe/Blue-Lines
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
示例#2
0
文件: api.py 项目: dotmpe/Blue-Lines
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