Ejemplo n.º 1
0
def check_project_files_meta_pems(self, project_uuid):
    from designsafe.apps.api.agave.models.files import BaseFileMetadata
    logger.debug('Checking metadata pems linked to a project')
    service = get_service_account_client()
    metas = BaseFileMetadata.search(service, {'associationIds': project_uuid,
                                              'name': BaseFileMetadata.NAME})
    for meta in metas:
        meta.match_pems_to_project(project_uuid)
Ejemplo n.º 2
0
def check_project_meta_pems(self, metadata_uuid):
    from designsafe.apps.api.agave.models.files import BaseFileMetadata
    logger.debug('Checking single metadata pems linked to a project %s', metadata_uuid)
    service = get_service_account_client()
    bfm = BaseFileMetadata.from_uuid(service, metadata_uuid)
    bfm.match_pems_to_project()