Source

hydra / apps / externals / views / by_type_and_id / map.py

Full commit
1
2
3
4
5
6
7
8
9
def mapfun(doc):
    if '.meta' not in doc:
        return
    meta = doc['.meta']
    if 'externals' not in meta:
        return
    for key, value in meta['externals'].items():
        yield [key, meta['type'], value['id']], {'rev': doc['_rev'],
                                                 'meta': meta}