Add default values to optional fields in SampleUpdate
This commit is contained in:
parent
782bfe9e0b
commit
1e766fa620
@ -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(
|
||||
|
@ -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]
|
||||
|
@ -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": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user