Example #1
0
def check_project_meta_pems(self, metadata_uuid):
    from designsafe.apps.data.models.agave.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()
Example #2
0
def check_project_files_meta_pems(self, project_uuid):
    from designsafe.apps.data.models.agave.files import BaseFileMetadata
    logger.debug('Checking metadata pems linked to a project')
    service = get_service_account_client()
    metas = BaseFileMetadata.search(service, {'associationIds': project_uuid})
    for meta in metas:
        logger.debug('checking %s:%s', meta.uuid, meta.name)
        meta.match_pems_to_project(project_uuid)