From b47cd87bf3fd1c7a4ea23980c30c615f88cfa559 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Fri, 2 Feb 2024 21:47:03 +0100 Subject: [PATCH] fixed subsample endpoint --- pephub/routers/api/v1/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pephub/routers/api/v1/project.py b/pephub/routers/api/v1/project.py index 013737f3..13c6ccd1 100644 --- a/pephub/routers/api/v1/project.py +++ b/pephub/routers/api/v1/project.py @@ -623,8 +623,8 @@ async def get_subsamples( project: example namespace: databio """ - subsamples = proj[SUBSAMPLE_RAW_LIST_KEY] - if subsamples is not None: + subsamples = proj.to_dict(extended=True, orient="records")[SUBSAMPLE_RAW_LIST_KEY] + if subsamples: try: subsamples = pd.DataFrame( proj[SUBSAMPLE_RAW_LIST_KEY][0]