From f37db54f1a7fcd1a7b28f0c3a8bb1cdbbb7a1c8d Mon Sep 17 00:00:00 2001 From: juhuntenburg Date: Thu, 4 Jan 2024 13:12:50 +0100 Subject: [PATCH] fix list_aggregates to work for public FI file records --- one/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/one/api.py b/one/api.py index b76f3d8b..5aea1773 100644 --- a/one/api.py +++ b/one/api.py @@ -1762,7 +1762,7 @@ def list_aggregates(self, relation: str, identifier: str = None, .reset_index(level=0) .drop('eid', axis=1) .rename_axis(index={'id': 'did'})) - records['relation'] = records['rel_path'].map(lambda x: x.split('/')[1].lower()) + records['relation'] = records['rel_path'].map(lambda x: x.split('aggregates')[-1].split('/')[1].lower()) records = records[records['relation'] == relation.lower()] def path2id(p) -> str: