Example #1
0
def _delete_rate_items(catalogs: ICatalogsService, user: IUser):
    query = search_query._replace(
        interfaces=IRate,
        references=[(None, IMetadata, 'creator', user)],
    )
    user_rates = catalogs.search(query).elements
    for rate in user_rates:
        _delete(rate)
Example #2
0
def _delete_rate_items(catalogs: ICatalogsService, user: IUser):
    query = search_query._replace(
        interfaces=IRate,
        references=[(None, IMetadata, 'creator', user)],
    )
    user_rates = catalogs.search(query).elements
    for rate in user_rates:
        _delete(rate)
Example #3
0
def _search_for_interfaces(catalogs: ICatalogsService,
                           interfaces: (IInterface)) -> [IResource]:
    query = search_query._replace(interfaces=interfaces)
    resources = catalogs.search(query).elements
    return resources
Example #4
0
def _search_for_interfaces(catalogs: ICatalogsService,
                           interfaces: (IInterface)) -> [IResource]:
    query = search_query._replace(interfaces=interfaces, resolve=True)
    resources = catalogs.search(query).elements
    return resources