未知(继上次中断)
This commit is contained in:
@@ -44,6 +44,7 @@ async def list_shipments(
|
||||
db: AsyncSession,
|
||||
study_id: uuid.UUID,
|
||||
center_id: uuid.UUID | None = None,
|
||||
center_ids: set[uuid.UUID] | None = None,
|
||||
site_name: str | None = None,
|
||||
tracking_no: str | None = None,
|
||||
direction: str | None = None,
|
||||
@@ -52,6 +53,10 @@ async def list_shipments(
|
||||
limit: int = 100,
|
||||
) -> Sequence[DrugShipment]:
|
||||
stmt = select(DrugShipment).where(DrugShipment.study_id == study_id)
|
||||
if center_ids is not None:
|
||||
if not center_ids:
|
||||
return []
|
||||
stmt = stmt.where(DrugShipment.center_id.in_(center_ids))
|
||||
if center_id:
|
||||
stmt = stmt.where(DrugShipment.center_id == center_id)
|
||||
if site_name:
|
||||
|
||||
Reference in New Issue
Block a user