Skip to content

Commit

Permalink
Fix slash typo in /api/v1/sequencing-groupCPGID endpoint (#1025)
Browse files Browse the repository at this point in the history
Add '/' so the endpoint is at the intended URL, and correct the
return type to avoid it always failing with "that's not a string".
Other similar endpoints returning `to_external()` either leave the
return type unspecified or return the appropriate external model
type like this. Fixes SET-386.
  • Loading branch information
jmarshall authored Feb 5, 2025
1 parent 8a19338 commit b36dc55
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/routes/sequencing_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
)
from db.python.layers.sequencing_group import SequencingGroupLayer
from models.models.project import FullWriteAccessRoles, ReadAccessRoles
from models.models.sequencing_group import SequencingGroupUpsertInternal
from models.models.sequencing_group import (
SequencingGroup,
SequencingGroupUpsertInternal,
)
from models.utils.sample_id_format import sample_id_format
from models.utils.sequencing_group_id_format import ( # Sample,
sequencing_group_id_format_list,
Expand All @@ -28,10 +31,10 @@ class SequencingGroupMetaUpdateModel(BaseModel):
meta: dict[str, Any] | None = None


@router.get('{sequencing_group_id}', operation_id='getSequencingGroup')
@router.get('/{sequencing_group_id}', operation_id='getSequencingGroup')
async def get_sequencing_group(
sequencing_group_id: str, connection: Connection = get_projectless_db_connection
) -> str:
) -> SequencingGroup:
"""Creates a new sample, and returns the internal sample ID"""
st = SequencingGroupLayer(connection)
sg = await st.get_sequencing_group_by_id(
Expand Down

0 comments on commit b36dc55

Please sign in to comment.