fixing bugs with ci pipeline

This commit is contained in:
GotthardG
2024-12-16 22:50:04 +01:00
parent e0e176881b
commit 0178de96fd
14 changed files with 145 additions and 96 deletions

View File

@@ -2,9 +2,10 @@ from fastapi import APIRouter, HTTPException, status, Query, Depends
from sqlalchemy.orm import Session
from typing import List, Optional
import logging
from pydantic import BaseModel, ValidationError
from pydantic import ValidationError
from datetime import date
from sqlalchemy.exc import SQLAlchemyError
import json
from app.models import (
Shipment as ShipmentModel,
@@ -19,12 +20,9 @@ from app.schemas import (
ShipmentCreate,
UpdateShipmentComments,
Shipment as ShipmentSchema,
DewarUpdate,
ContactPerson as ContactPersonSchema,
Sample as SampleSchema,
DewarCreate,
PuckCreate,
SampleCreate,
DewarSchema,
)
from app.database import get_db
@@ -185,7 +183,8 @@ async def update_shipment(
if not contact_person:
raise HTTPException(
status_code=404,
detail=f"Contact person with ID {value} for Dewar {dewar_data.dewar_id} not found",
detail=f"Contact person with ID {value}"
f"for Dewar {dewar_data.dewar_id} not found",
)
if key == "return_address_id":
address = (
@@ -194,7 +193,8 @@ async def update_shipment(
if not address:
raise HTTPException(
status_code=404,
detail=f"Address with ID {value} for Dewar {dewar_data.dewar_id} not found",
detail=f"Address with ID {value}"
f"for Dewar {dewar_data.dewar_id} not found",
)
for key, value in update_fields.items():