merge_machine/admin.py
def delete_loose_links(self):
        '''
        Delete link projects for which a normalization project is non existant or not defined
        '''
        res = []
        for proj_metadata in self.list_projects('link'):
            if (proj_metadata['files']['source'] is None) \
                or (proj_metadata['files']['ref'] is None) \
                or ((proj_metadata['files']['source']['project_id'] not in self.normalize_project_ids)) \
                or ((proj_metadata['files']['ref']['project_id'] not in self.normalize_project_ids)):
                self.remove_project('link', proj_metadata['project_id'])
                res.append(proj_metadata['project_id'])
        return res

        Delete link projects for which a normalization project is non existant or not defined
        
Delete link projects for which a normalization project is non existant or not defined
Delete link projects for which a normalization project is non existant or not defined
def delete_loose_links(self):
        res = []
        for proj_metadata in self.list_projects('link'):
            if (proj_metadata['files']['source'] is None) \
                or (proj_metadata['files']['ref'] is None) \
                or ((proj_metadata['files']['source']['project_id'] not in self.normalize_project_ids)) \
                or ((proj_metadata['files']['ref']['project_id'] not in self.normalize_project_ids)):
                self.remove_project('link', proj_metadata['project_id'])
                res.append(proj_metadata['project_id'])
        return res
def delete_loose_links ( self ) : res = [ ] for proj_metadata in self . list_projects ( 'link' ) : if ( proj_metadata [ 'files' ] [ 'source' ] is None ) or ( proj_metadata [ 'files' ] [ 'ref' ] is None ) or ( ( proj_metadata [ 'files' ] [ 'source' ] [ 'project_id' ] not in self . normalize_project_ids ) ) or ( ( proj_metadata [ 'files' ] [ 'ref' ] [ 'project_id' ] not in self . normalize_project_ids ) ) : self . remove_project ( 'link' , proj_metadata [ 'project_id' ] ) res . append ( proj_metadata [ 'project_id' ] ) return res
Delete link projects for which a normalization project is non existant or not defined
Delete link projects for which a normalization project is non existant or not defined
'''
        Delete link projects for which a normalization project is non existant or not defined
        '''
self