Skip to content

Commit

Permalink
fixed subsample endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
khoroshevskyi committed Feb 2, 2024
1 parent 7f91246 commit b47cd87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pephub/routers/api/v1/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b47cd87

Please sign in to comment.