diff --git a/backend/app/routers/puck.py b/backend/app/routers/puck.py index a51b145..3c97860 100644 --- a/backend/app/routers/puck.py +++ b/backend/app/routers/puck.py @@ -233,7 +233,10 @@ async def get_pucks_with_tell_position(db: Session = Depends(get_db)): for puck, event, dewar in pucks_with_events: # Fetch associated samples for this puck samples = db.query(SampleModel).filter(SampleModel.puck_id == puck.id).all() - + # Print fetched data for debugging + print(f"Pucks with Events and Dewars: {pucks_with_events}") + for puck, event, dewar in pucks_with_events: + print(f"Puck: {puck}, Event: {event}, Dewar: {dewar}") # Construct the response model results.append( PuckWithTellPosition( diff --git a/backend/app/schemas.py b/backend/app/schemas.py index 659009f..c2c8c62 100644 --- a/backend/app/schemas.py +++ b/backend/app/schemas.py @@ -662,8 +662,8 @@ class PuckWithTellPosition(BaseModel): puck_name: str puck_type: str puck_location_in_dewar: Optional[str] - dewar_id: int - dewar_name: str + dewar_id: Optional[int] + dewar_name: Optional[str] user: str = "e16371" samples: Optional[List[Sample]] = None tell_position: Optional[str] diff --git a/testfunctions.ipynb b/testfunctions.ipynb index 75c5d21..27531d0 100644 --- a/testfunctions.ipynb +++ b/testfunctions.ipynb @@ -6,8 +6,8 @@ "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2025-01-09T19:28:22.688759Z", - "start_time": "2025-01-09T19:28:22.686126Z" + "end_time": "2025-01-10T08:43:36.036628Z", + "start_time": "2025-01-10T08:43:36.033611Z" } }, "source": [ @@ -37,7 +37,7 @@ ] } ], - "execution_count": 60 + "execution_count": 72 }, { "metadata": {