Make shipment fields optional and refactor test scripts.

Updated the `number_of_pucks` and `number_of_samples` fields in the `schemas.py` to be optional for greater flexibility. Simplified the test Jupyter Notebook by restructuring imports and consolidating function calls for better readability and maintainability.
This commit is contained in:
GotthardG
2025-01-17 09:36:16 +01:00
parent 481068603b
commit 9739b8cfe9
6 changed files with 485 additions and 309 deletions

View File

@ -126,7 +126,7 @@ const ShipmentDetails: React.FC<ShipmentDetailsProps> = ({
throw new Error('Missing required fields');
}
const createdDewar = await DewarsService.createDewarDewarsPost(newDewarToPost);
const createdDewar = await DewarsService.createOrUpdateDewarDewarsPost(selectedShipment.id, newDewarToPost);
if (createdDewar && selectedShipment) {
const updatedShipment = await ShipmentsService.addDewarToShipmentShipmentsShipmentIdAddDewarPost(selectedShipment.id, createdDewar.id);