Add image upload endpoint and fix puck location handling
Introduced `/samples/{sample_id}/upload-images` API for uploading images tied to samples, validating file types, and saving them in structured directories. Fixed `puck_location_in_dewar` type handling in puck routes. Updated project version in `pyproject.toml`.
This commit is contained in:
@ -244,7 +244,7 @@ async def get_pucks_with_tell_position(db: Session = Depends(get_db)):
|
||||
id=int(puck.id),
|
||||
puck_name=str(puck.puck_name),
|
||||
puck_type=str(puck.puck_type),
|
||||
puck_location_in_dewar=str(puck.puck_location_in_dewar)
|
||||
puck_location_in_dewar=int(puck.puck_location_in_dewar)
|
||||
if puck.puck_location_in_dewar
|
||||
else None,
|
||||
dewar_id=int(puck.dewar_id) if puck.dewar_id else None,
|
||||
@ -477,7 +477,7 @@ async def get_pucks_by_slot(slot_identifier: str, db: Session = Depends(get_db))
|
||||
id=puck.id,
|
||||
puck_name=puck.puck_name,
|
||||
puck_type=puck.puck_type,
|
||||
puck_location_in_dewar=str(puck.puck_location_in_dewar)
|
||||
puck_location_in_dewar=int(puck.puck_location_in_dewar)
|
||||
if puck.puck_location_in_dewar
|
||||
else None,
|
||||
dewar_id=puck.dewar_id,
|
||||
|
Reference in New Issue
Block a user